Logo

dev-resources.site

for different kinds of informations.

github action services: mysql, redis and elasticsearch

Published at
9/24/2024
Categories
github
actions
ci
elasticsearch
Author
ugifractal
Categories
4 categories in total
github
open
actions
open
ci
open
elasticsearch
open
Author
10 person written this
ugifractal
open
github action services: mysql, redis and elasticsearch

A few days ago, I needed to setup github actions for running Rails tests that required MySQL, Redis, and Elasticsearch to be installed.

Here is a is a sample configuration to boot MySQL, Redis, and elasticsearch that can be accessed from 127.0.0.1 address.

    services:
      mysql:
        image: mysql:8.0
        ports:
          - 3306:3306
        env:
          MYSQL_DATABASE: sample_database_test
          MYSQL_ROOT_PASSWORD: root
        options: >-
          --health-cmd "mysqladmin ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
      redis:
        image: redis
        ports:
          - 6379:6379
        # Set health checks to wait until redis has started
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
      elasticsearch:
        image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0
        ports:
          - 9200:9200
        options: --health-cmd="curl http://localhost:9200/_cluster/health" -e "discovery.type=single-node" -e "xpack.security.enabled=false"

Enter fullscreen mode Exit fullscreen mode
actions Article's
30 articles in total
Favicon
How to upload Markdown files to Dev.to from GitHub
Favicon
How to Configure GitHub Actions CI for Python Using Poetry on Multiple Versions
Favicon
Proposal: Standard Communication API Channels for AI Agents (AI Generated)
Favicon
Understanding GitHub Actions Working Directory
Favicon
Automating Mastodon Posts with GitHub Actions
Favicon
Getting Started with GitHub Actions: A Beginner's Guide to Automation
Favicon
Configure GitHub for Dev.to Publishing
Favicon
Getting Started with GitHub Actions: A Beginner's Guide to Automation
Favicon
Configure GitHub for Dev.to Publishing
Favicon
github action services: mysql, redis and elasticsearch
Favicon
Future-Proofing Your Auth0 Integration: Moving from Rules and Hooks to Actions
Favicon
6 GitHub Actions Every DevOps Team Needs
Favicon
GitHub Workflow and Automation: Streamlining Project Management 🚀
Favicon
Server actions in Next.js
Favicon
Actions - React 19
Favicon
NextJs Server Actions: Why and How
Favicon
The truth about Mindset and how it can influence your actions positively
Favicon
Optimizing Parallel Jobs in a Github Workflow
Favicon
How to set preconfigured actions in the CloudBees platform
Favicon
Auto-deploy docker images to Docker Hub using GitHub actions
Favicon
Secure NextJS Server Actions Using Body Validation
Favicon
Github action to detect ip addresses
Favicon
Vegaration: Visualising continuous integration using Github actions and vega-lite
Favicon
GitHub Action for Commit Message Validation
Favicon
Query GitHub Repo Topics Using GraphQL
Favicon
Setup a Dynamic GitHub User Profile README
Favicon
How to publish React App (CRA) on Github Pages using Github Actions with Turborepo
Favicon
Guide: Automate the deployment of a virtual machine on AWS using Terraform and Github Actions
Favicon
Netlify Nextjs Deployment — Page Not Found Issue Solution
Favicon
Github Actions

Featured ones: