version: '3' services: db: image: 'postgres:10.3-alpine' volumes: - 'db:/var/lib/postgresql/data' env_file: - '.env' healthcheck: test: /usr/bin/pg_isready interval: 5s timeout: 10s retries: 120 web: build: . depends_on: - 'db' ports: - '80:3000' volumes: - '.:/app' env_file: - '.env' environment: - RAILS_SERVE_STATIC_FILES=true command: bundle exec rails server -p 3000 -b '0.0.0.0' volumes: db: