Skip to content

Instantly share code, notes, and snippets.

@rafaelqueiroz88
Created September 21, 2021 23:23
Show Gist options
  • Save rafaelqueiroz88/dbc454d75bbb2bcdbb05e7bb628d1e0c to your computer and use it in GitHub Desktop.
Save rafaelqueiroz88/dbc454d75bbb2bcdbb05e7bb628d1e0c to your computer and use it in GitHub Desktop.
Ruby on Rails docker-compose file
version: '3'
services:
app:
build: .
container_name: fsapp
restart: unless-stopped
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/app
- bundle-volume:/usr/local/bundle
ports:
- "3000:3000"
depends_on:
- db
- redis
env_file:
- .env
sidekiq:
build: .
container_name: fssidekiq
volumes:
- .:/app
depends_on:
- db
- redis
command: bundle exec sidekiq
env_file:
- .env
redis:
image: redis
container_name: fsredis
db:
image: postgres
container_name: fspostgres
volumes:
- db-volume:/var/lib/postgresql
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: nopass
volumes:
bundle-volume:
db-volume:
db-data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment