version: "3.8" services: db: env_file: "vars.env" image: postgres container_name: local_pgdb restart: always environment: POSTGRES_USER: ${DB_USERNAME} POSTGRES_PASSWORD: ${DB_PASSWORD} volumes: - local_pgdata:/var/lib/postgresql/data networks: pg-net: aliases: [] pgadmin: env_file: "vars.env" image: dpage/pgadmin4 container_name: pgadmin4_container restart: always environment: PGADMIN_DEFAULT_EMAIL: ${PG_EMAIL} PGADMIN_DEFAULT_PASSWORD: ${PG_PASSWORD} volumes: - pgadmin-data:/var/lib/pgadmin networks: pg-net: aliases: [] pgcloudflare: image: cloudflare/cloudflared command: tunnel --no-autoupdate run environment: - TUNNEL_TOKEN=${CF_TOKEN} networks: pg-net: aliases: [] volumes: local_pgdata: pgadmin-data: networks: pg-net: driver: "bridge"