add docker
This commit is contained in:
31
docker-compose.yml
Normal file
31
docker-compose.yml
Normal file
@ -0,0 +1,31 @@
|
||||
version: '3'
|
||||
|
||||
volumes:
|
||||
bundle:
|
||||
db:
|
||||
|
||||
services:
|
||||
db:
|
||||
image: nouchka/sqlite3:latest
|
||||
volumes:
|
||||
- db:/root/db
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
web: &rails
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rake db:create db:migrate db:seed && bundle exec rails s -b '0.0.0.0'"
|
||||
volumes:
|
||||
- .:/app
|
||||
- bundle:/usr/local/bundle
|
||||
- ./node_modules:/app/node_modules
|
||||
tmpfs: /app/tmp
|
||||
depends_on:
|
||||
- db
|
||||
env_file: app.env
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "3000:3000"
|
||||
Reference in New Issue
Block a user