Compare commits
No commits in common. "d018ce7f0af8dcec9a029488ecc7fbb6edb7c8f6" and "67840280109a1483a25cf3277abd0ce86bb4fab4" have entirely different histories.
d018ce7f0a
...
6784028010
@ -1,4 +0,0 @@
|
|||||||
API_GATEWAY_PORT=48443
|
|
||||||
API_GATEWAY_UI_PORT=48444
|
|
||||||
API_REGISTRY_UI_PORT=48445
|
|
||||||
API_EVENTBUS_UI_PORT=48446
|
|
@ -2,12 +2,10 @@ version: "3.9"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
api-gateway:
|
api-gateway:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=egommerce.local
|
- APP_DOMAIN=egommerce.local
|
||||||
# - APP_PORT=48443
|
|
||||||
ports:
|
ports:
|
||||||
- '40056:443'
|
- '8443:443'
|
||||||
- '40057:8080'
|
- '40057:8080'
|
||||||
- '5672:5672'
|
- '5672:5672'
|
||||||
|
|
||||||
@ -15,18 +13,15 @@ services:
|
|||||||
command: ["-bootstrap-expect=1", "-ui-content-path=/registry", -log-level=DEBUG]
|
command: ["-bootstrap-expect=1", "-ui-content-path=/registry", -log-level=DEBUG]
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=registry.egommerce.local
|
- APP_DOMAIN=registry.egommerce.local
|
||||||
# - APP_PORT=48445
|
|
||||||
ports:
|
ports:
|
||||||
# - '8300:8300'
|
- '8300:8300'
|
||||||
- '40058:8500'
|
- '40058:8500'
|
||||||
# - '8600:8600'
|
# - '8600:8600'
|
||||||
- '8600:8600/udp'
|
- '8600:8600/udp'
|
||||||
|
|
||||||
api-eventbus:
|
api-eventbus:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=eventbus.egommerce.local
|
- APP_DOMAIN=eventbus.egommerce.local
|
||||||
# - APP_PORT=48446
|
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.tcp.routers.eventbus.rule=HostSNI(`*`)
|
- traefik.tcp.routers.eventbus.rule=HostSNI(`*`)
|
||||||
@ -38,120 +33,107 @@ services:
|
|||||||
- '15672:15672'
|
- '15672:15672'
|
||||||
|
|
||||||
api-cache:
|
api-cache:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=redis.egommerce.local
|
- APP_DOMAIN=redis.egommerce.local
|
||||||
command: ["redis-server", "/etc/redis.conf", "--requirepass", "12345678"]
|
command: ["redis-server", "/etc/redis.conf", "--requirepass", "12345678"]
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- '6379:6379'
|
||||||
|
|
||||||
api-logger:
|
api-logger:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=logger.egommerce.local
|
- APP_DOMAIN=logger.egommerce.local
|
||||||
ports:
|
ports:
|
||||||
- 24224:24224
|
- '24224:24224'
|
||||||
|
|
||||||
# api-prometheus:
|
# api-prometheus:
|
||||||
# environment:
|
# environment:
|
||||||
# - APP_DOMAIN=prometheus.egommerce.local
|
# - APP_DOMAIN=prometheus.egommerce.local
|
||||||
# ports:
|
# ports:
|
||||||
# - 9090:9090
|
# - '9090:9090'
|
||||||
|
|
||||||
# api-grafana:
|
# api-grafana:
|
||||||
# environment:
|
# environment:
|
||||||
# - APP_DOMAIN=grafana.egommerce.local
|
# - APP_DOMAIN=grafana.egommerce.local
|
||||||
# ports:
|
# ports:
|
||||||
# - 3000:3000
|
# - '3000:3000'
|
||||||
|
|
||||||
postgres-db:
|
postgres-db:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=postgres.egommerce.local
|
- APP_DOMAIN=postgres.egommerce.local
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- '5432:5432'
|
||||||
|
|
||||||
mongo-db:
|
mongo-db:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=mongo.egommerce.local
|
- APP_DOMAIN=mongo.egommerce.local
|
||||||
ports:
|
ports:
|
||||||
- 27017:27017
|
- '27017:27017'
|
||||||
|
|
||||||
identity-svc:
|
identity-svc:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=identity.api.egommerce.local
|
- APP_DOMAIN=identity.api.egommerce.local
|
||||||
- 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
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- '8080:80'
|
||||||
|
|
||||||
basket-svc:
|
basket-svc:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=basket.api.egommerce.local
|
- APP_DOMAIN=basket.api.egommerce.local
|
||||||
- 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
|
||||||
ports:
|
ports:
|
||||||
- 8001:80
|
- '8001:80'
|
||||||
|
|
||||||
catalog-svc:
|
catalog-svc:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=catalog.api.egommerce.local
|
- APP_DOMAIN=catalog.api.egommerce.local
|
||||||
- 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
|
||||||
ports:
|
ports:
|
||||||
- 8002:80
|
- '8002:80'
|
||||||
|
|
||||||
order-svc:
|
order-svc:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=order.api.egommerce.local
|
- APP_DOMAIN=order.api.egommerce.local
|
||||||
- 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
|
||||||
ports:
|
ports:
|
||||||
- 8003:80
|
- '8003:80'
|
||||||
|
|
||||||
pricing-svc:
|
pricing-svc:
|
||||||
env_file: .env.local
|
|
||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=pricing.api.egommerce.local
|
- APP_DOMAIN=pricing.api.egommerce.local
|
||||||
- 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
|
||||||
ports:
|
ports:
|
||||||
- 8004:80
|
- '8004:80'
|
||||||
|
|
||||||
# Workers (EventBus)
|
# Workers (EventBus)
|
||||||
basket-worker:
|
basket-worker:
|
||||||
env_file: .env.local
|
|
||||||
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:
|
||||||
env_file: .env.local
|
|
||||||
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:
|
||||||
env_file: .env.local
|
|
||||||
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:
|
||||||
env_file: .env.local
|
|
||||||
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
|
||||||
|
@ -11,8 +11,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=api-registry
|
- APP_DOMAIN=api-registry
|
||||||
- CONSUL_HTTP_TOKEN=devop
|
- CONSUL_HTTP_TOKEN=devop
|
||||||
volumes:
|
|
||||||
- ./certs/api-registry:/consul/data/certs
|
|
||||||
|
|
||||||
api-eventbus:
|
api-eventbus:
|
||||||
image: git.pbiernat.dev/egommerce/api-eventbus:dev
|
image: git.pbiernat.dev/egommerce/api-eventbus:dev
|
||||||
@ -47,6 +45,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- APP_DOMAIN=postgres-db
|
- APP_DOMAIN=postgres-db
|
||||||
- POSTGRES_PASSWORD=12345678
|
- POSTGRES_PASSWORD=12345678
|
||||||
|
# ports:
|
||||||
|
# - '5432:5432'
|
||||||
|
|
||||||
mongo-db:
|
mongo-db:
|
||||||
environment:
|
environment:
|
||||||
|
@ -316,7 +316,6 @@ volumes:
|
|||||||
#grafana-db: ~
|
#grafana-db: ~
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
# Infrastructure networks
|
|
||||||
api-gateway-network:
|
api-gateway-network:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
#internal: true
|
#internal: true
|
||||||
@ -353,7 +352,7 @@ networks:
|
|||||||
driver: overlay
|
driver: overlay
|
||||||
#internal: true
|
#internal: true
|
||||||
|
|
||||||
# Micro-services networks
|
# api micro-services networks
|
||||||
identity-svc-network:
|
identity-svc-network:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
#internal: true
|
#internal: true
|
||||||
@ -375,6 +374,10 @@ networks:
|
|||||||
#internal: true
|
#internal: true
|
||||||
|
|
||||||
# Workers networks
|
# Workers networks
|
||||||
|
# identity-worker-network:
|
||||||
|
# driver: overlay
|
||||||
|
# internal: true
|
||||||
|
|
||||||
basket-worker-network:
|
basket-worker-network:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
#internal: true
|
#internal: true
|
||||||
|
@ -1,109 +0,0 @@
|
|||||||
upstream egommerce-api-gw {
|
|
||||||
server 127.0.0.1:48443;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream egommerce-api-gw-dashboard {
|
|
||||||
server 127.0.0.1:48444;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream egommerce-api-registry-ui {
|
|
||||||
server 127.0.0.1:48445;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream egommerce-api-eventbus-mngmt {
|
|
||||||
server 127.0.0.1:48446;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 443 ssl;
|
|
||||||
ssl_certificate /home/keedosn/workspace/golang/src/git.pbiernat.dev/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;
|
|
||||||
|
|
||||||
server_name egommerce.local;
|
|
||||||
|
|
||||||
# Traefik redirects
|
|
||||||
location /dashboard {
|
|
||||||
if ($http_referer ~ (/gateway)) {
|
|
||||||
proxy_pass http://egommerce-api-gw-dashboard;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
location /api {
|
|
||||||
if ($http_referer ~ (/gateway)) {
|
|
||||||
proxy_pass http://egommerce-api-gw-dashboard;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
location /gateway/ {
|
|
||||||
proxy_pass http://egommerce-api-gw-dashboard/dashboard/;
|
|
||||||
proxy_pass_header Server;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
client_max_body_size 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Consul redirects
|
|
||||||
location /ui {
|
|
||||||
if ($http_referer ~ (/registry)) {
|
|
||||||
proxy_pass http://egommerce-api-registry-ui;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
location /v1 {
|
|
||||||
if ($http_referer ~ (/registry)) {
|
|
||||||
proxy_pass http://egommerce-api-registry-ui;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
location /registry {
|
|
||||||
proxy_pass http://egommerce-api-registry-ui;
|
|
||||||
proxy_pass_header Server;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
client_max_body_size 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# RabbitMQ Mngmt redirects
|
|
||||||
location /eventbus {
|
|
||||||
return 302 /eventbus/;
|
|
||||||
}
|
|
||||||
location ~* /eventbus/api/(.*?)/(.*) {
|
|
||||||
proxy_pass http://egommerce-api-eventbus-mngmt/api/$1/%2F/$2?$query_string;
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_pass_header Server;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
location ~* /eventbus/(.*) {
|
|
||||||
rewrite ^/eventbus/(.*)$ /$1 break;
|
|
||||||
proxy_pass http://egommerce-api-eventbus-mngmt;
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_pass_header Server;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Pass all requests to the API Gateway
|
|
||||||
location / {
|
|
||||||
proxy_pass https://egommerce-api-gw;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_pass_header Server;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
client_max_body_size 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_log /var/log/nginx/egommerce.local-error.log;
|
|
||||||
access_log /var/log/nginx/egommerce.local-access.log combined;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user