Last active
November 3, 2019 15:40
-
-
Save beauraF/dd4f586d33dc560fe2b8ac6bc7c3019b to your computer and use it in GitHub Desktop.
Simple docker-compose configuration for Rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
postgres: | |
container_name: my_rails_project_postgres | |
image: postgres:11.5-alpine | |
ports: ['5432:5432'] | |
environment: | |
POSTGRES_USER: ${USER} | |
volumes: | |
- ./tmp/db:/var/lib/postgresql/data | |
healthcheck: | |
test: ['CMD', 'pg_isready', '-U', '${USER}'] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
redis: | |
container_name: my_rails_project_redis | |
image: redis:5.0.6-alpine | |
ports: ['6379:6379'] | |
healthcheck: | |
test: ['CMD', 'redis-cli', 'ping'] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
maildev: | |
container_name: my_rails_project_maildev | |
image: djfarrelly/maildev:latest | |
ports: | |
- '1080:80' | |
- '1025:25' | |
healthcheck: | |
test: ['CMD', 'curl', '--fail', 'http://localhost'] | |
interval: 10s | |
timeout: 5s | |
retries: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment