mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
version: '2'
|
|
services:
|
|
db:
|
|
container_name: scinote_db_development
|
|
image: postgres:9.4
|
|
volumes:
|
|
- scinote_development_postgres:/var/lib/postgresql/data
|
|
|
|
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
|
|
volumes:
|
|
- .:/usr/src/app
|
|
- scinote_development_bundler:/usr/local/bundle/
|
|
- scinote_development_files:/usr/src/app/public/system
|
|
|
|
webpack:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: scinote_web_development
|
|
container_name: scinote_webpack_development
|
|
stdin_open: true
|
|
tty: true
|
|
ports:
|
|
- "8080:8080"
|
|
command: >
|
|
bash -c "./bin/webpack-dev-server"
|
|
environment:
|
|
- RAILS_ENV=development
|
|
volumes:
|
|
- .:/usr/src/app
|
|
|
|
volumes:
|
|
scinote_development_postgres:
|
|
scinote_development_bundler:
|
|
scinote_development_files:
|