--- version: "3" services: covidbot: restart: always build: context: . dockerfile: Dockerfile image: covidbot:latest user: covidbot container_name: covidbot_container_service networks: - net links: - postgres volumes: - ./lib:/home/covidbot/lib - ./config:/home/covidbot/config environment: BOT_CONFIG_PATH: config/config.json covidreport: restart: always build: context: . dockerfile: Dockerfile_report image: covidreport:latest user: covidreport container_name: covidreport_container_service networks: - net links: - postgres volumes: - ./lib:/home/covidreport/lib - ./config:/home/covidreport/config environment: BOT_CONFIG_PATH: config/config.json postgres: restart: always image: postgres:alpine networks: - net ports: - 8123:8123 volumes: - ./pg_data:/var/lib/postgresql/data/pg_data - ./config:/config environment: POSTGRES_PASSWORD_FILE: /config/pgdb.key POSTGRES_DB: covid_prod POSTGRES_USER: covidbot POSTGRES_HOST: localhost POSTGRES_PORT: 8123 PGDATA: /var/lib/postgresql/data/pg_data networks: net: volumes: pg_data: