version: '3' services: db: image: postgres:9.5-alpine volumes: - pg-data:/var/lib/postgresql/data app: image: ama build: . ports: - '3000:3000' volumes: - .:/ama - /ama/node_modules command: ash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" depends_on: - db tty: true stdin_open: true environment: DATABASE_HOST: db DATABASE_USERNAME: postgres volumes: pg-data: