add docker

This commit is contained in:
sam
2022-05-14 17:20:04 +04:30
parent 23bb0bca0d
commit b9bde40edc
4 changed files with 54 additions and 2 deletions

31
docker-compose.yml Normal file
View 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"