scinote-web/docker-compose.yml

61 lines
1.5 KiB
YAML
Raw Normal View History

version: '2'
services:
db:
container_name: scinote_db_development
image: postgres:9.6
volumes:
- scinote_development_postgres:/var/lib/postgresql/data
2019-09-09 22:46:51 +08:00
ports:
- "5432:5432"
2016-02-12 23:52:43 +08:00
web:
build:
context: .
dockerfile: Dockerfile
image: scinote_web_development
container_name: scinote_web_development
stdin_open: true
tty: true
depends_on:
- db
ports:
- "3000:3000"
command: >
bash -c "rm -f /usr/src/app/tmp/pids/server.pid &&
(bundle check || bundle install) &&
bundle exec rails s -b 0.0.0.0"
environment:
- RAILS_ENV=development
2018-11-22 18:51:58 +08:00
- WEBPACKER_DEV_SERVER_HOST=webpack
volumes:
- .:/usr/src/app
2017-04-21 21:13:20 +08:00
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
- scinote_development_storage:/usr/src/app/storage
2016-02-12 23:52:43 +08:00
2017-07-12 22:41:55 +08:00
webpack:
build:
context: .
dockerfile: Dockerfile
image: scinote_web_development
container_name: scinote_webpack_development
stdin_open: true
tty: true
ports:
- "3035:3035"
2017-07-12 22:41:55 +08:00
command: >
bash -c "./bin/webpack-dev-server"
environment:
- RAILS_ENV=development
- WORKER=true
2017-07-12 22:41:55 +08:00
volumes:
- .:/usr/src/app
2018-11-22 18:51:58 +08:00
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
2017-07-12 22:41:55 +08:00
volumes:
scinote_development_postgres:
scinote_development_bundler:
scinote_development_files:
scinote_development_storage: