version: "3.9" services: # INFRASTRUCTURE SERVICES api-gateway: image: git.pbiernat.dev/egommerce/api-gateway:dev hostname: egommerce.pbiernat.dev environment: - APP_DOMAIN=egommerce.pbiernat.dev labels: - traefik.enable=true - traefik.http.routers.api-gateway.rule=PathPrefix(`/admin/gateway`) - traefik.http.routers.api-gateway.tls=true - traefik.http.routers.api-gateway.entryPoints=https - traefik.http.routers.api-gateway.service=api-gateway - traefik.http.services.api-gateway.loadbalancer.server.scheme=http - traefik.http.services.api-gateway.loadbalancer.server.port=8080 - traefik.tls.certificates.certfile=/certs/client.cert - traefik.tls.certificates.keyfile=/certs/client.key volumes: - ./certs/api-gateway:/etc/traefik/certs api-registry: image: git.pbiernat.dev/egommerce/api-registry:dev hostname: registry.egommerce.pbiernat.dev environment: - APP_DOMAIN=registry.egommerce.pbiernat.dev labels: - traefik.enable=true # - traefik.http.routers.api-registry.rule=PathPrefix(`/admin/registry`) - traefik.http.routers.api-registry.rule=Headers(`X-API-SERVICE`, `admin-registry`) - traefik.http.routers.api-registry.tls=true - traefik.http.routers.api-registry.tls.domains[0].main=egommerce.pbiernat.dev - traefik.http.routers.api-registry.entryPoints=https - traefik.http.routers.api-registry.service=api-registry - traefik.http.routers.api-registry.middlewares=registry-stripprefix - traefik.http.services.api-registry.loadbalancer.server.scheme=http - traefik.http.services.api-registry.loadbalancer.server.port=8500 - traefik.http.middlewares.registry-stripprefix.stripprefix.prefixes=/admin/registry - traefik.tls.certificates.certfile=/certs/client.cert - traefik.tls.certificates.keyfile=/certs/client.key volumes: - ./certs/api-gateway:/certs api-eventbus: image: git.pbiernat.dev/egommerce/api-eventbus:dev hostname: eventbus.egommerce.pbiernat.dev environment: - APP_DOMAIN=eventbus.egommerce.pbiernat.dev - RABBITMQ_NODENAME=api-eventbus # - RABBITMQ_DEFAULT_USER = admin # - RABBITMQ_DEFAULT_PASS = passw123 labels: - traefik.enable=true - traefik.http.routers.api-eventbus.rule=PathPrefix(`/admin/eventbus`) - traefik.http.routers.api-eventbus.tls=true - traefik.http.routers.api-eventbus.tls.domains[0].main=egommerce.pbiernat.dev - traefik.http.routers.api-eventbus.entryPoints=https - traefik.http.routers.api-eventbus.service=api-eventbus - traefik.http.routers.api-eventbus.middlewares=eventbus-stripprefix - traefik.http.services.api-eventbus.loadbalancer.server.scheme=http - traefik.http.services.api-eventbus.loadbalancer.server.port=15672 - traefik.http.middlewares.eventbus-stripprefix.stripprefix.prefixes=/admin/eventbus - traefik.tls.certificates.certfile=/certs/client.cert - traefik.tls.certificates.keyfile=/certs/client.key volumes: - ./certs/api-gateway:/certs api-logger: image: git.pbiernat.dev/egommerce/api-logger:dev hostname: logger.egommerce.pbiernat.dev environment: - APP_DOMAIN=logger.egommerce.pbiernat.dev # ports: # - 24224:24224 postgres-db: hostname: db.egommerce.pbiernat.dev environment: - APP_DOMAIN=db.egommerce.pbiernat.dev - POSTGRES_PASSWORD=12345678 # ports: # - '5432:5432' # volumes: # - ./certs/postgres-db:/certs mongo-db: hostname: mongodb.egommerce.pbiernat.dev environment: - APP_DOMAIN=mongodb.egommerce.pbiernat.dev - MONGO_INITDB_ROOT_PASSWORD=12345678 # ports: # - '27017:27017' # volumes: # - ./certs/mongo-db:/certs # API micro-services identity-svc: image: git.pbiernat.dev/egommerce/identity-svc:dev environment: - APP_DOMAIN=identity.api.egommerce.pbiernat.dev - DATABASE_URL=postgres://postgres:12345678@db.egommerce.pbiernat.dev:5432/egommerce - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.pbiernat.dev:27017 - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.pbiernat.dev:5672 volumes: - ./certs/api-gateway:/certs basket-svc: image: git.pbiernat.dev/egommerce/basket-svc:dev environment: - APP_DOMAIN=basket.api.egommerce.pbiernat.dev - DATABASE_URL=postgres://postgres:12345678@db.egommerce.pbiernat.dev:5432/egommerce - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.pbiernat.dev:27017 - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.pbiernat.dev:5672 volumes: - ./certs/api-gateway:/certs catalog-svc: image: git.pbiernat.dev/egommerce/catalog-svc:dev environment: - APP_DOMAIN=catalog.api.egommerce.pbiernat.dev - DATABASE_URL=postgres://postgres:12345678@db.egommerce.pbiernat.dev:5432/egommerce - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.pbiernat.dev:27017 - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.pbiernat.dev:5672 volumes: - ./certs/api-gateway:/certs order-svc: image: git.pbiernat.dev/egommerce/order-svc:dev environment: - APP_DOMAIN=order.api.egommerce.pbiernat.dev - DATABASE_URL=postgres://postgres:12345678@db.egommerce.pbiernat.dev:5432/egommerce - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.pbiernat.dev:27017 - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.pbiernat.dev:5672 volumes: - ./certs/api-gateway:/certs # Workers (EventBus) basket-worker: image: git.pbiernat.dev/egommerce/basket-worker:dev deploy: replicas: 2 environment: - DATABASE_URL=postgres://postgres:12345678@db.egommerce.pbiernat.dev:5432/egommerce - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.pbiernat.dev:27017 - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.pbiernat.dev:5672 catalog-worker: image: git.pbiernat.dev/egommerce/catalog-worker:dev deploy: replicas: 2 environment: - DATABASE_URL=postgres://postgres:12345678@db.egommerce.pbiernat.dev:5432/egommerce - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.pbiernat.dev:27017 - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.pbiernat.dev:5672 order-worker: image: git.pbiernat.dev/egommerce/order-worker:dev deploy: replicas: 2 environment: - DATABASE_URL=postgres://postgres:12345678@db.egommerce.pbiernat.dev:5432/egommerce - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.pbiernat.dev:27017 - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.pbiernat.dev:5672