Skip to content

Instantly share code, notes, and snippets.

@danielalvarenga
Created March 8, 2018 15:45
Show Gist options
  • Save danielalvarenga/7152dbef120095439fb7f309d5d041d9 to your computer and use it in GitHub Desktop.
Save danielalvarenga/7152dbef120095439fb7f309d5d041d9 to your computer and use it in GitHub Desktop.
Docker compose base for rails applications (It needs docker-compose.override.yml to dev execution).
version: '3'
services:
setup:
image: 'currencytracker:latest'
command: "bundle exec rails db:create db:migrate db:seed"
app:
depends_on:
- 'setup'
image: 'currencytracker:latest'
container_name: currencytracker_app
command: 'bundle exec puma -C config/puma.rb'
volumes:
- '.:/app'
ports:
- "80:3000"
sidekiq:
depends_on:
- 'setup'
image: 'currencytracker:latest'
container_name: sidekiq
command: 'bundle exec sidekiq -C config/sidekiq.yml.erb'
volumes:
- '.:/app'
# web:
# depends_on:
# - 'app'
# image: 'nginx:latest'
# container_name: nginx
# ports:
# - '80:80'
# - '443:443'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment