Create a gist now

Instantly share code, notes, and snippets.

version: "2"
services:
mysql:
environment:
MYSQL_ROOT_PASSWORD: password
image: mysql:5.6.23
ports:
- "3306:3306"
nginx:
image: nginx:1.11.5
ports:
- "8080:80"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
node:
build:
context: ./
dockerfile: ./docker/node/Dockerfile
volumes:
- ./.babelrc:/app/.babelrc
- ./.eslintignore:/app/.eslintignore
- ./.eslintrc:/app/.eslintrc
- ./client:/app/client
- ./package.json:/app/package.json
- ./public/assets:/app/public/assets
- ./webpack.config.js:/app/webpack.config.js
- ./yarn.lock:/app/yarn.lock
- node_modules:/app/node_modules
redis:
image: redis:3.2.6-alpine
ports:
- "6379:6379"
sidekiq: &sidekiq
build:
context: ./
dockerfile: ./docker/rails/Dockerfile
command: bundle exec sidekiq --queue high --queue low
environment:
MYSQL_HOST: mysql
MYSQL_PASSWORD: password
MYSQL_PORT: 3306
volumes:
- ./app:/app/app
- ./bin:/app/bin
- ./config:/app/config
- ./config.ru:/app/config.ru
- ./db:/app/db
- ./Gemfile:/app/Gemfile
- ./Gemfile.lock:/app/Gemfile.lock
- ./lib:/app/lib
- ./public:/app/public
- ./Rakefile:/app/Rakefile
- ./scripts:/app/scripts
- bundle:/bundle
puma:
<<: *sidekiq
command: bundle exec puma -C config/puma-development.rb
ports:
- "3000:3000"
volumes:
bundle:
node_modules:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment