awesome-compose/rails-postgres/compose.yaml
Alex Koch bbad983a6e
Add sample rails + postgresql application
Signed-off-by: Alex Koch <alex@esparklearning.com>
2022-09-16 11:05:27 -05:00

18 lines
386 B
YAML

services:
app:
build: ./app
ports:
- "3000:3000"
depends_on:
- database
command: bash -c "bundle exec rails db:migrate && bundle exec rails server -b 0.0.0.0"
database:
image: postgres:14
volumes:
- postgres:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: app_development
volumes:
postgres: