This commit is contained in:
Piotr Biernat 2024-12-05 21:54:28 +01:00
parent b9b8a57a5b
commit 0173d65f9b
6 changed files with 32 additions and 38 deletions

View File

@ -2,7 +2,7 @@
## RUNNING ## RUNNING
# $ sh deploy/start-stack.sh # $ make up
## MAINTENANCE ## MAINTENANCE

View File

@ -26,12 +26,6 @@ services:
environment: environment:
- APP_DOMAIN=eventbus.egommerce.local - APP_DOMAIN=eventbus.egommerce.local
# - APP_PORT=48446 # - APP_PORT=48446
labels:
- traefik.enable=true
- traefik.tcp.routers.eventbus.rule=HostSNI(`*`)
- traefik.tcp.routers.eventbus.entrypoints=rabbitmq
- traefik.tcp.routers.eventbus.service=eventbus
- traefik.tcp.services.eventbus.loadbalancer.server.port=5672
ports: ports:
- 48446:8084 - 48446:8084
- 15672:15672 - 15672:15672

View File

@ -2,14 +2,14 @@ version: "3.9"
services: services:
api-gateway: api-gateway:
image: git.pbiernat.dev/egommerce/api-gateway:dev image: git.ego.cloudns.be/egommerce/api-gateway:dev
environment: environment:
- APP_DOMAIN=api-gateway - APP_DOMAIN=api-gateway
volumes: volumes:
- ./certs/api-gateway:/etc/traefik/certs - ./certs/api-gateway:/etc/traefik/certs
api-registry: api-registry:
image: git.pbiernat.dev/egommerce/api-registry:dev image: git.ego.cloudns.be/egommerce/api-registry:dev
environment: environment:
- APP_DOMAIN=api-registry - APP_DOMAIN=api-registry
- CONSUL_HTTP_TOKEN=devop - CONSUL_HTTP_TOKEN=devop
@ -17,7 +17,7 @@ services:
- ./certs/api-registry:/consul/data/certs - ./certs/api-registry:/consul/data/certs
api-eventbus: api-eventbus:
image: git.pbiernat.dev/egommerce/api-eventbus:dev image: git.ego.cloudns.be/egommerce/api-eventbus:dev
environment: environment:
- APP_DOMAIN=api-eventbus - APP_DOMAIN=api-eventbus
# - RABBITMQ_NODENAME=api-eventbus # - RABBITMQ_NODENAME=api-eventbus
@ -26,12 +26,12 @@ services:
# - RABBITMQ_DEFAULT_PASS = passw123 # - RABBITMQ_DEFAULT_PASS = passw123
api-cache: api-cache:
image: git.pbiernat.dev/egommerce/api-cache:dev image: git.ego.cloudns.be/egommerce/api-cache:dev
environment: environment:
- PASSWORD=12345678 - PASSWORD=12345678
api-logger: api-logger:
image: git.pbiernat.dev/egommerce/api-logger:dev image: git.ego.cloudns.be/egommerce/api-logger:dev
environment: environment:
- APP_DOMAIN=api-logger - APP_DOMAIN=api-logger
@ -57,7 +57,7 @@ services:
# API micro-services # API micro-services
identity-svc: identity-svc:
image: git.pbiernat.dev/egommerce/identity-svc:dev image: git.ego.cloudns.be/egommerce/identity-svc:dev
environment: environment:
- APP_DOMAIN=identity-svc - APP_DOMAIN=identity-svc
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce - DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
@ -67,7 +67,7 @@ services:
- ./certs/api-gateway:/certs - ./certs/api-gateway:/certs
basket-svc: basket-svc:
image: git.pbiernat.dev/egommerce/basket-svc:dev image: git.ego.cloudns.be/egommerce/basket-svc:dev
environment: environment:
- APP_DOMAIN=basket-svc - APP_DOMAIN=basket-svc
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik - AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
@ -78,7 +78,7 @@ services:
- ./certs/api-gateway:/certs - ./certs/api-gateway:/certs
catalog-svc: catalog-svc:
image: git.pbiernat.dev/egommerce/catalog-svc:dev image: git.ego.cloudns.be/egommerce/catalog-svc:dev
environment: environment:
- APP_DOMAIN=catalog-svc - APP_DOMAIN=catalog-svc
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik - AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
@ -89,7 +89,7 @@ services:
- ./certs/api-gateway:/certs - ./certs/api-gateway:/certs
pricing-svc: pricing-svc:
image: git.pbiernat.dev/egommerce/pricing-svc:dev image: git.ego.cloudns.be/egommerce/pricing-svc:dev
environment: environment:
- APP_DOMAIN=pricing-svc - APP_DOMAIN=pricing-svc
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik - AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
@ -100,7 +100,7 @@ services:
- ./certs/api-gateway:/certs - ./certs/api-gateway:/certs
order-svc: order-svc:
image: git.pbiernat.dev/egommerce/order-svc:dev image: git.ego.cloudns.be/egommerce/order-svc:dev
environment: environment:
- APP_DOMAIN=order-svc - APP_DOMAIN=order-svc
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik - AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
@ -112,28 +112,28 @@ services:
# Workers (Eventbus) # Workers (Eventbus)
basket-worker: basket-worker:
image: git.pbiernat.dev/egommerce/basket-worker:dev image: git.ego.cloudns.be/egommerce/basket-worker:dev
environment: environment:
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce - DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017 - MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672 - EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
catalog-worker: catalog-worker:
image: git.pbiernat.dev/egommerce/catalog-worker:dev image: git.ego.cloudns.be/egommerce/catalog-worker:dev
environment: environment:
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce - DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017 - MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672 - EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
pricing-worker: pricing-worker:
image: git.pbiernat.dev/egommerce/pricing-worker:dev image: git.ego.cloudns.be/egommerce/pricing-worker:dev
environment: environment:
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce - DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017 - MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672 - EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
order-worker: order-worker:
image: git.pbiernat.dev/egommerce/order-worker:dev image: git.ego.cloudns.be/egommerce/order-worker:dev
environment: environment:
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce - DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017 - MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017

View File

@ -2,7 +2,7 @@ version: "3.9"
services: services:
api-gateway: api-gateway:
image: git.pbiernat.dev/egommerce/api-gateway:latest image: git.ego.cloudns.be/egommerce/api-gateway:latest
# command: # command:
# - '--providers.consulcatalog.refreshinterval=5s' # - '--providers.consulcatalog.refreshinterval=5s'
# FIXME ^^ only on config option: static/env/cli must be selected # FIXME ^^ only on config option: static/env/cli must be selected
@ -19,7 +19,7 @@ services:
- api-logger-network - api-logger-network
api-registry: api-registry:
image: git.pbiernat.dev/egommerce/api-registry:latest image: git.ego.cloudns.be/egommerce/api-registry:latest
environment: environment:
- APP_NAME=api-registry - APP_NAME=api-registry
- APP_DOMAIN - APP_DOMAIN
@ -32,7 +32,7 @@ services:
- api-logger-network - api-logger-network
api-eventbus: api-eventbus:
image: git.pbiernat.dev/egommerce/api-eventbus:latest image: git.ego.cloudns.be/egommerce/api-eventbus:latest
environment: environment:
# - RABBITMQ_NODENAME=api-eventbus # - RABBITMQ_NODENAME=api-eventbus
- RABBITMQ_ERLANG_COOKIE=rabbitmq - RABBITMQ_ERLANG_COOKIE=rabbitmq
@ -48,7 +48,7 @@ services:
- api-logger-network - api-logger-network
api-cache: api-cache:
image: git.pbiernat.dev/egommerce/api-cache:latest image: git.ego.cloudns.be/egommerce/api-cache:latest
environment: environment:
- APP_NAME=api-cache - APP_NAME=api-cache
networks: networks:
@ -56,7 +56,7 @@ services:
- api-logger-network - api-logger-network
api-logger: api-logger:
image: git.pbiernat.dev/egommerce/api-logger:latest image: git.ego.cloudns.be/egommerce/api-logger:latest
environment: environment:
- APP_NAME=api-logger - APP_NAME=api-logger
- APP_DOMAIN - APP_DOMAIN
@ -129,7 +129,7 @@ services:
# API micro-services # API micro-services
identity-svc: identity-svc:
image: git.pbiernat.dev/egommerce/identity-svc:latest image: git.ego.cloudns.be/egommerce/identity-svc:latest
environment: environment:
- APP_NAME=identity-svc - APP_NAME=identity-svc
- APP_PATH_PREFIX=/identity - APP_PATH_PREFIX=/identity
@ -150,7 +150,7 @@ services:
- mongodb-db-network - mongodb-db-network
basket-svc: basket-svc:
image: git.pbiernat.dev/egommerce/basket-svc:latest image: git.ego.cloudns.be/egommerce/basket-svc:latest
environment: environment:
- APP_NAME=basket-svc - APP_NAME=basket-svc
- APP_PATH_PREFIX=/basket - APP_PATH_PREFIX=/basket
@ -174,7 +174,7 @@ services:
- mongodb-db-network - mongodb-db-network
catalog-svc: catalog-svc:
image: git.pbiernat.dev/egommerce/catalog-svc:latest image: git.ego.cloudns.be/egommerce/catalog-svc:latest
environment: environment:
- APP_NAME=catalog-svc - APP_NAME=catalog-svc
- APP_PATH_PREFIX=/catalog - APP_PATH_PREFIX=/catalog
@ -196,7 +196,7 @@ services:
- mongodb-db-network - mongodb-db-network
pricing-svc: pricing-svc:
image: git.pbiernat.dev/egommerce/pricing-svc:latest image: git.ego.cloudns.be/egommerce/pricing-svc:latest
environment: environment:
- APP_NAME=pricing-svc - APP_NAME=pricing-svc
- APP_PATH_PREFIX=/pricing - APP_PATH_PREFIX=/pricing
@ -218,7 +218,7 @@ services:
- mongodb-db-network - mongodb-db-network
order-svc: order-svc:
image: git.pbiernat.dev/egommerce/order-svc:latest image: git.ego.cloudns.be/egommerce/order-svc:latest
environment: environment:
- APP_NAME=order-svc - APP_NAME=order-svc
- APP_PATH_PREFIX=/order - APP_PATH_PREFIX=/order
@ -241,7 +241,7 @@ services:
# Workers (Eventbus) # Workers (Eventbus)
basket-worker: basket-worker:
image: git.pbiernat.dev/egommerce/basket-worker:latest image: git.ego.cloudns.be/egommerce/basket-worker:latest
environment: environment:
- APP_NAME=basket-worker - APP_NAME=basket-worker
- APP_KV_NAMESPACE - APP_KV_NAMESPACE
@ -259,7 +259,7 @@ services:
- mongodb-db-network - mongodb-db-network
catalog-worker: catalog-worker:
image: git.pbiernat.dev/egommerce/catalog-worker:latest image: git.ego.cloudns.be/egommerce/catalog-worker:latest
environment: environment:
- APP_NAME=catalog-worker - APP_NAME=catalog-worker
- DATABASE_URL - DATABASE_URL
@ -275,7 +275,7 @@ services:
- mongodb-db-network - mongodb-db-network
pricing-worker: pricing-worker:
image: git.pbiernat.dev/egommerce/pricing-worker:latest image: git.ego.cloudns.be/egommerce/pricing-worker:latest
environment: environment:
- APP_NAME=pricing-worker - APP_NAME=pricing-worker
- DATABASE_URL - DATABASE_URL
@ -291,7 +291,7 @@ services:
- mongodb-db-network - mongodb-db-network
order-worker: order-worker:
image: git.pbiernat.dev/egommerce/order-worker:latest image: git.ego.cloudns.be/egommerce/order-worker:latest
environment: environment:
- APP_NAME=order-worker - APP_NAME=order-worker
- DATABASE_URL - DATABASE_URL

View File

@ -16,8 +16,8 @@ upstream egommerce-api-eventbus-mngmt {
server { server {
listen 443 ssl; listen 443 ssl;
ssl_certificate /home/keedosn/workspace/golang/src/git.pbiernat.dev/egommerce/stack/deploy/certs/api-gateway/localhost.cert; ssl_certificate /home/keedosn/workspace/golang/src/git.ego.cloudns.be/egommerce/stack/deploy/certs/api-gateway/localhost.cert;
ssl_certificate_key /home/keedosn/workspace/golang/src/git.pbiernat.dev/egommerce/stack/deploy/certs/api-gateway/localhost.key; ssl_certificate_key /home/keedosn/workspace/golang/src/git.ego.cloudns.be/egommerce/stack/deploy/certs/api-gateway/localhost.key;
server_name egommerce.local; server_name egommerce.local;

View File

@ -3,7 +3,7 @@
echo "Starting egommerce docker stack..." echo "Starting egommerce docker stack..."
docker stack deploy --with-registry-auth \ docker stack deploy --with-registry-auth \
--detach=true \ --detach=false \
--compose-file deploy/docker/stack.yml \ --compose-file deploy/docker/stack.yml \
--compose-file deploy/docker/stack.prod.yml \ --compose-file deploy/docker/stack.prod.yml \
--compose-file deploy/docker/stack.dev.yml \ --compose-file deploy/docker/stack.dev.yml \