version: "3" services: redis: container_name: redis image: redis:7.0-rc2-alpine networks: - webnet ports: - "6378:6379" api-gateway: container_name: api-gateway networks: - webnet environment: RANDOM_ENV_VARIABLE: RANDOM_ENV_VARIABLE_VALUE REDIS_HOST: redis build: context: ./api-gateway dockerfile: "Dockerfile" target: base depends_on: - redis - auth-service - application-data-service ports: - "4000:5000" volumes: - ./api-gateway:/opt/app command: yarn watch auth-service: container_name: auth-service environment: REDIS_HOST: redis networks: - webnet build: context: ./auth-service dockerfile: "Dockerfile" target: base volumes: - ./auth-service:/opt/app depends_on: - auth-service-db ports: - "7100:4000" command: yarn watch auth-service-db: container_name: auth-service-db image: postgres user: postgres networks: - webnet environment: POSTGRES_DB: auth-service-db POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres volumes: - ./pgdata/auth-service:/var/lib/postgresql/data/ ports: - "7200:5432" application-data-service: container_name: application-data-service networks: - webnet build: context: ./application-data-service dockerfile: "Dockerfile" target: base volumes: - ./application-data-service:/opt/app depends_on: - application-data-service-db ports: - "7101:4000" command: yarn watch application-data-service-db: container_name: application-data-service-db image: postgres user: postgres networks: - webnet environment: POSTGRES_DB: application-data-service-db POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres volumes: - ./pgdata/application-data-service:/var/lib/postgresql/data/ ports: - "7201:5432" networks: webnet: