Skip to content

Instantly share code, notes, and snippets.

@samacs
Created July 3, 2019 02:39
Show Gist options
  • Save samacs/eba166f7d217dccf2298e68ad0ee2beb to your computer and use it in GitHub Desktop.
Save samacs/eba166f7d217dccf2298e68ad0ee2beb to your computer and use it in GitHub Desktop.
version: "3"
services:
billine:
build:
context: .
dockerfile: billine/Dockerfile
hostname: billine
restart: always
env_file:
- .env
volumes:
- ./billine:/billine
- bundler-data:/bundler
- ./billine/Gemfile:/bundler/Gemfile
- ./billine/Gemfile.lock:/bundler/Gemfile.lock
ports:
- "${PORT_LOCAL:-3000}:${PORT:-3000}"
depends_on:
- billine-postgres
- billine-redis
- billine-sidekiq
billine-postgres:
image: postgres:11
hostname: billine-db
restart: always
env_file:
- .env
volumes:
- postgres-data:/var/lib/postgresql/data
billine-redis:
image: redis:5
hostname: billine-redis
restart: always
command: redis-server --appendonly yes
env_file:
- .env
volumes:
- redis-data:/data
billine-sidekiq:
build:
context: .
dockerfile: billine/Dockerfile
command: bundle exec sidekiq --environment ${RAILS_ENV:-development} -C config/sidekiq.yml
hostname: billine-sidekiq
restart: always
env_file:
- .env
volumes:
- ./billine:/billine
- bundler-data:/bundler
- ./billine/Gemfile:/bundler/Gemfile
- ./billine/Gemfile.lock:/bundler/Gemfile.lock
volumes:
bundler-data:
postgres-data:
redis-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment