version: '3' services: db: image: 'postgres:9.6-alpine' environment: - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} ports: - "5434:5432" backend: restart: on-failure environment: - APP_ENVIRONMENT=production - DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}" build: context: ../ dockerfile: ./backend/Dockerfile image: flowy_backend:${BACKEND_VERSION} depends_on: - db ports: - 8000:8000