udemy-go-microservices/project/docker-compose.yml
2024-09-01 07:39:42 +02:00

75 lines
1.7 KiB
YAML

services:
broker-service:
build:
context: ./../broker-service/
dockerfile: ./../broker-service/broker-service.dockerfile
restart: always
ports:
- "8080:80"
deploy:
mode: replicated
replicas: 1
authentication-service:
build:
context: ./../authentication-service/
dockerfile: ./../authentication-service/authentication-service.dockerfile
ports:
- "8081:80"
deploy:
mode: replicated
replicas: 1
environment:
DSN: "host=postgres port=5432 user=postgres password=password dbname=users timezone=UTC connect_timeout=5"
logger-service:
build:
context: ./../logger-service/
dockerfile: ./../logger-service/logger-service.dockerfile
restart: always
deploy:
mode: replicated
replicas: 1
postgres:
image: postgres
ports:
- "5432:5432"
restart: always
deploy:
mode: replicated
replicas: 1
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: users
volumes:
- ./db-data/postgres:/var/lib/postgresql/data
mongo:
image: mongo
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- ./db-data/mongo:/data/db
adminer:
image: adminer
restart: always
ports:
- 8090:8080
mongo-express:
image: mongo-express
restart: always
ports:
- 8091:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: admin
ME_CONFIG_MONGODB_ADMINPASSWORD: password
ME_CONFIG_MONGODB_URL: mongodb://admin:password@mongo:27017/
ME_CONFIG_BASICAUTH: false