Compare commits
No commits in common. "7e5d3273d8ebf2ae42356e1c94b9b17b4a286848" and "a3428542e7c5ead07635593d1f30e108a974332e" have entirely different histories.
7e5d3273d8
...
a3428542e7
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
#*.local.yml
|
*.local.yml
|
||||||
|
2
Makefile
2
Makefile
@ -4,4 +4,4 @@ up:
|
|||||||
- sh ${DEPLOY_DIR}/start-stack.sh
|
- sh ${DEPLOY_DIR}/start-stack.sh
|
||||||
|
|
||||||
down:
|
down:
|
||||||
- docker stack rm egommerce
|
- docker stack egommerce
|
||||||
|
10
README.md
10
README.md
@ -1,9 +1,3 @@
|
|||||||
# Egommerce docker stack
|
# stack
|
||||||
|
|
||||||
## RUNNING
|
Egommerce docker stack
|
||||||
|
|
||||||
# $ sh deploy/start-stack.sh
|
|
||||||
|
|
||||||
## MAINTENANCE
|
|
||||||
|
|
||||||
### If certificate doesn't work try to copy contents of the key file at the end of the cert file.
|
|
@ -1 +0,0 @@
|
|||||||
DROP TABLE IF EXISTS pricing.price;
|
|
@ -1,9 +0,0 @@
|
|||||||
CREATE TABLE IF NOT EXISTS pricing."price"
|
|
||||||
(
|
|
||||||
id uuid NOT NULL DEFAULT gen_random_uuid()
|
|
||||||
);
|
|
||||||
|
|
||||||
ALTER TABLE IF EXISTS "pricing"."price"
|
|
||||||
OWNER to postgres;
|
|
||||||
|
|
||||||
-- TODO ^^ PRIVILEGES...
|
|
@ -1,139 +0,0 @@
|
|||||||
version: "3.9"
|
|
||||||
|
|
||||||
services:
|
|
||||||
api-gateway:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=egommerce.local
|
|
||||||
ports:
|
|
||||||
- '8443:443'
|
|
||||||
- '8888:8080'
|
|
||||||
- '5672:5672'
|
|
||||||
|
|
||||||
api-registry:
|
|
||||||
command: ["-ui-content-path=/registry"]
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=registry.egommerce.local
|
|
||||||
ports:
|
|
||||||
- '8500:8500'
|
|
||||||
# - '8600:8600'
|
|
||||||
# - '8600:8600/udp'
|
|
||||||
|
|
||||||
api-eventbus:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=eventbus.egommerce.local
|
|
||||||
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:
|
|
||||||
- '18084:8084'
|
|
||||||
- '15672:15672'
|
|
||||||
|
|
||||||
api-cache:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=redis.egommerce.local
|
|
||||||
command: ["redis-server", "/etc/redis.conf", "--requirepass", "12345678"]
|
|
||||||
ports:
|
|
||||||
- '6379:6379'
|
|
||||||
|
|
||||||
api-logger:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=logger.egommerce.local
|
|
||||||
ports:
|
|
||||||
- '24224:24224'
|
|
||||||
|
|
||||||
# api-prometheus:
|
|
||||||
# environment:
|
|
||||||
# - APP_DOMAIN=prometheus.egommerce.local
|
|
||||||
# ports:
|
|
||||||
# - '9090:9090'
|
|
||||||
|
|
||||||
# api-grafana:
|
|
||||||
# environment:
|
|
||||||
# - APP_DOMAIN=grafana.egommerce.local
|
|
||||||
# ports:
|
|
||||||
# - '3000:3000'
|
|
||||||
|
|
||||||
postgres-db:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=postgres.egommerce.local
|
|
||||||
ports:
|
|
||||||
- '5432:5432'
|
|
||||||
|
|
||||||
mongo-db:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=mongo.egommerce.local
|
|
||||||
ports:
|
|
||||||
- '27017:27017'
|
|
||||||
|
|
||||||
identity-svc:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=identity.api.egommerce.local
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
ports:
|
|
||||||
- '8080:80'
|
|
||||||
|
|
||||||
basket-svc:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=basket.api.egommerce.local
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
ports:
|
|
||||||
- '8001:80'
|
|
||||||
|
|
||||||
catalog-svc:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=catalog.api.egommerce.local
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
ports:
|
|
||||||
- '8002:80'
|
|
||||||
|
|
||||||
order-svc:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=order.api.egommerce.local
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
ports:
|
|
||||||
- '8003:80'
|
|
||||||
|
|
||||||
pricing-svc:
|
|
||||||
environment:
|
|
||||||
- APP_DOMAIN=pricing.api.egommerce.local
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
ports:
|
|
||||||
- '8004:80'
|
|
||||||
|
|
||||||
# Workers (EventBus)
|
|
||||||
basket-worker:
|
|
||||||
environment:
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
|
|
||||||
catalog-worker:
|
|
||||||
environment:
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
|
|
||||||
pricing-worker:
|
|
||||||
environment:
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
||||||
|
|
||||||
order-worker:
|
|
||||||
environment:
|
|
||||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
|
||||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
|
||||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
|
@ -1,8 +1,10 @@
|
|||||||
version: "3.9"
|
version: "3.9"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
# INFRASTRUCTURE SERVICES
|
||||||
api-gateway:
|
api-gateway:
|
||||||
image: git.pbiernat.dev/egommerce/api-gateway:dev
|
image: git.pbiernat.dev/egommerce/api-gateway:dev
|
||||||
|
hostname: api-gateway
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=api-gateway
|
- APP_DOMAIN=api-gateway
|
||||||
volumes:
|
volumes:
|
||||||
@ -10,12 +12,14 @@ services:
|
|||||||
|
|
||||||
api-registry:
|
api-registry:
|
||||||
image: git.pbiernat.dev/egommerce/api-registry:dev
|
image: git.pbiernat.dev/egommerce/api-registry:dev
|
||||||
|
hostname: api-registry
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=api-registry
|
- APP_DOMAIN=api-registry
|
||||||
- CONSUL_HTTP_TOKEN=devop
|
- CONSUL_HTTP_TOKEN=devop
|
||||||
|
|
||||||
api-eventbus:
|
api-eventbus:
|
||||||
image: git.pbiernat.dev/egommerce/api-eventbus:dev
|
image: git.pbiernat.dev/egommerce/api-eventbus:dev
|
||||||
|
hostname: api-eventbus
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=api-eventbus
|
- APP_DOMAIN=api-eventbus
|
||||||
# - RABBITMQ_NODENAME=api-eventbus
|
# - RABBITMQ_NODENAME=api-eventbus
|
||||||
@ -30,20 +34,24 @@ services:
|
|||||||
|
|
||||||
api-logger:
|
api-logger:
|
||||||
image: git.pbiernat.dev/egommerce/api-logger:dev
|
image: git.pbiernat.dev/egommerce/api-logger:dev
|
||||||
|
hostname: api-logger
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=api-logger
|
- APP_DOMAIN=api-logger
|
||||||
|
|
||||||
#api-prometheus:
|
#api-prometheus:
|
||||||
# image: prom/prometheus:latest # FIXME: create private image(prod/dev)...
|
# image: prom/prometheus:latest # FIXME: create private image(prod/dev)...
|
||||||
|
# hostname: prometheus.keshop.bieda.it
|
||||||
# environment:
|
# environment:
|
||||||
# - APP_DOMAIN=prometheus.keshop.bieda.it
|
# - APP_DOMAIN=prometheus.keshop.bieda.it
|
||||||
|
|
||||||
#api-grafana:
|
#api-grafana:
|
||||||
# image: grafana/grafana-oss:latest # FIXME: create private image(prod/dev)...
|
# image: grafana/grafana-oss:latest # FIXME: create private image(prod/dev)...
|
||||||
|
# hostname: grafana.keshop.bieda.it
|
||||||
# environment:
|
# environment:
|
||||||
# - APP_DOMAIN=grafana.keshop.bieda.it
|
# - APP_DOMAIN=grafana.keshop.bieda.it
|
||||||
|
|
||||||
postgres-db:
|
postgres-db:
|
||||||
|
hostname: postgres-db
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=postgres-db
|
- APP_DOMAIN=postgres-db
|
||||||
- POSTGRES_PASSWORD=12345678
|
- POSTGRES_PASSWORD=12345678
|
||||||
@ -51,8 +59,9 @@ services:
|
|||||||
# - '5432:5432'
|
# - '5432:5432'
|
||||||
|
|
||||||
mongo-db:
|
mongo-db:
|
||||||
|
hostname: mongodb.keshop.bieda.it
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=mongo-db
|
- APP_DOMAIN=mongodb-db
|
||||||
- MONGO_INITDB_ROOT_PASSWORD=12345678
|
- MONGO_INITDB_ROOT_PASSWORD=12345678
|
||||||
|
|
||||||
# API micro-services
|
# API micro-services
|
||||||
@ -70,7 +79,6 @@ services:
|
|||||||
image: git.pbiernat.dev/egommerce/basket-svc:dev
|
image: git.pbiernat.dev/egommerce/basket-svc:dev
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=basket-svc
|
- APP_DOMAIN=basket-svc
|
||||||
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
|
|
||||||
- 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
|
||||||
@ -81,7 +89,6 @@ services:
|
|||||||
image: git.pbiernat.dev/egommerce/catalog-svc:dev
|
image: git.pbiernat.dev/egommerce/catalog-svc:dev
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=catalog-svc
|
- APP_DOMAIN=catalog-svc
|
||||||
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
|
|
||||||
- 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
|
||||||
@ -92,7 +99,6 @@ services:
|
|||||||
image: git.pbiernat.dev/egommerce/pricing-svc:dev
|
image: git.pbiernat.dev/egommerce/pricing-svc:dev
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=pricing-svc
|
- APP_DOMAIN=pricing-svc
|
||||||
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
|
|
||||||
- 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
|
||||||
@ -103,14 +109,13 @@ services:
|
|||||||
image: git.pbiernat.dev/egommerce/order-svc:dev
|
image: git.pbiernat.dev/egommerce/order-svc:dev
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=order-svc
|
- APP_DOMAIN=order-svc
|
||||||
- AUTH_HANDLER_URL=http://identity-svc/api/v1/traefik
|
|
||||||
- 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
|
||||||
volumes:
|
volumes:
|
||||||
- ./certs/api-gateway:/certs
|
- ./certs/api-gateway:/certs
|
||||||
|
|
||||||
# Workers (Eventbus)
|
# Workers (EventBus)
|
||||||
basket-worker:
|
basket-worker:
|
||||||
image: git.pbiernat.dev/egommerce/basket-worker:dev
|
image: git.pbiernat.dev/egommerce/basket-worker:dev
|
||||||
environment:
|
environment:
|
||||||
|
@ -154,7 +154,6 @@ services:
|
|||||||
- APP_PATH_PREFIX=/basket
|
- APP_PATH_PREFIX=/basket
|
||||||
- APP_DOMAIN
|
- APP_DOMAIN
|
||||||
- APP_KV_NAMESPACE
|
- APP_KV_NAMESPACE
|
||||||
- AUTH_HANDLER_URL
|
|
||||||
- DATABASE_URL
|
- DATABASE_URL
|
||||||
- MONGODB_URL
|
- MONGODB_URL
|
||||||
- EVENTBUS_URL
|
- EVENTBUS_URL
|
||||||
@ -178,7 +177,6 @@ services:
|
|||||||
- APP_PATH_PREFIX=/catalog
|
- APP_PATH_PREFIX=/catalog
|
||||||
- APP_DOMAIN
|
- APP_DOMAIN
|
||||||
- APP_KV_NAMESPACE
|
- APP_KV_NAMESPACE
|
||||||
- AUTH_HANDLER_URL
|
|
||||||
- DATABASE_URL
|
- DATABASE_URL
|
||||||
- MONGODB_URL
|
- MONGODB_URL
|
||||||
- EVENTBUS_URL
|
- EVENTBUS_URL
|
||||||
@ -200,7 +198,6 @@ services:
|
|||||||
- APP_PATH_PREFIX=/pricing
|
- APP_PATH_PREFIX=/pricing
|
||||||
- APP_DOMAIN
|
- APP_DOMAIN
|
||||||
- APP_KV_NAMESPACE
|
- APP_KV_NAMESPACE
|
||||||
- AUTH_HANDLER_URL
|
|
||||||
- DATABASE_URL
|
- DATABASE_URL
|
||||||
- MONGODB_URL
|
- MONGODB_URL
|
||||||
- EVENTBUS_URL
|
- EVENTBUS_URL
|
||||||
@ -222,7 +219,6 @@ services:
|
|||||||
- APP_PATH_PREFIX=/order
|
- APP_PATH_PREFIX=/order
|
||||||
- APP_DOMAIN
|
- APP_DOMAIN
|
||||||
- APP_KV_NAMESPACE
|
- APP_KV_NAMESPACE
|
||||||
- AUTH_HANDLER_URL
|
|
||||||
- DATABASE_URL
|
- DATABASE_URL
|
||||||
- MONGODB_URL
|
- MONGODB_URL
|
||||||
- EVENTBUS_URL
|
- EVENTBUS_URL
|
||||||
@ -237,7 +233,7 @@ services:
|
|||||||
- postgres-db-network
|
- postgres-db-network
|
||||||
- mongodb-db-network
|
- mongodb-db-network
|
||||||
|
|
||||||
# Workers (Eventbus)
|
# Workers (EventBus)
|
||||||
basket-worker:
|
basket-worker:
|
||||||
image: git.pbiernat.dev/egommerce/basket-worker:latest
|
image: git.pbiernat.dev/egommerce/basket-worker:latest
|
||||||
environment:
|
environment:
|
||||||
@ -248,7 +244,7 @@ services:
|
|||||||
- EVENTBUS_URL
|
- EVENTBUS_URL
|
||||||
networks:
|
networks:
|
||||||
- basket-worker-network
|
- basket-worker-network
|
||||||
- pricing-svc-network
|
# - pricing-svc-network
|
||||||
- api-gateway-network
|
- api-gateway-network
|
||||||
- api-registry-network
|
- api-registry-network
|
||||||
- api-eventbus-network
|
- api-eventbus-network
|
||||||
|
Loading…
Reference in New Issue
Block a user