Browse Source

added basket, catalog, public web and publicweb gateway

pull/112/head
Galip Tolga Erdem 4 years ago
parent
commit
6c1ff3628c
  1. 115
      etc/docker/docker-compose.yml
  2. 64
      etc/docker/nginx/conf.d/default.conf

115
etc/docker/docker-compose.yml

@ -15,6 +15,10 @@ services:
- eshop-st-administration
- eshop-st-authserver
- eshop-st-identity
- eshop-st-basket
- eshop-st-catalog
- eshop-st-public-web
- eshop-st-gateway-web-public
networks:
- eshoponabp-network
@ -71,9 +75,9 @@ services:
# - AuthServer__SwaggerClientId=WebGateway_Swagger
# - AuthServer__SwaggerClientSecret=1q2w3e*
- IdentityServerClients__Web__RootUrl=http://localhost:4200
- IdentityServerClients__PublicWeb__RootUrl=https://localhost:44335
- IdentityServerClients__PublicWeb__RootUrl=https://eshop-st-public-web
- IdentityServerClients__WebGateway__RootUrl=https://localhost:44372
- IdentityServerClients__PublicWebGateway__RootUrl=https://localhost:44373
- IdentityServerClients__PublicWebGateway__RootUrl=https://eshop-st-gateway-web-public
- IdentityServerClients__IdentityService__RootUrl=https://eshop-st-identity
- IdentityServerClients__AdministrationService__RootUrl=https://eshop-st-administration
- IdentityServerClients__AccountService__RootUrl=https://eshop-st-authserver
@ -93,28 +97,26 @@ services:
- eshoponabp-network
# volumes:
# - ./certs:/root/certificate
catalog-service:
eshop-st-catalog:
image: eshoponabp/service-catalog:latest
container_name: catalog-service-container
build:
context: ../../
dockerfile: services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=https://+:443;http://+:80;http://+:81;
# - Kestrel__Certificates__Default__Path=/root/certificate/eshop-dk.pfx
# - Kestrel__Certificates__Default__Password=8b6039b6-c67a-448b-977b-0ce6d3fcfd49
# - ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80;http://+:81;
- App__SelfUrl=https://eshop-st-catalog
- App__CorsOrigins=https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-public-web,https://eshop-st-web
- AuthServer__Authority=http://eshop-st-authserver
- AuthServer__RequireHttpsMetadata=false
- Kestrel__EndPoints__Http__Url=http://docker.host.internal:80
- Kestrel__EndPoints__Https__Url=https://docker.host.internal:443
- Kestrel__EndPoints__gRPC__Url=http://docker.host.internal:81
# - Redis__Configuration=redis
# - RabbitMQ__Connections__Default__HostName=rabbitmq
# - ConnectionStrings__CatalogService=mongodb://mongodb/EShopOnAbp_Catalog
# - ConnectionStrings__AdministrationService=User ID=postgres;Password=myPassw0rd;Host=postgres-db;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;
# ports:
# - "44354:443"
# - "5000:80"
# - "81:81"
- Kestrel__EndPoints__gRPC__Protocols=Http2
- ConnectionStrings__CatalogService=mongodb://mongodb/EShopOnAbp_Catalog
- ConnectionStrings__AdministrationService=User ID=postgres;Password=myPassw0rd;Host=postgres-db;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;
- Redis__Configuration=redis
- RabbitMQ__Connections__Default__HostName=rabbitmq
depends_on:
redis:
condition: service_healthy
@ -127,24 +129,24 @@ services:
- eshoponabp-network
# volumes:
# - ./certs:/root/certificate
basket-service:
eshop-st-basket:
image: eshoponabp/service-basket:latest
container_name: basket-service-container
build:
context: ../../
dockerfile: services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=https://+:443;http://+:80;
# - Kestrel__Certificates__Default__Path=/root/certificate/eshop-dk.pfx
# - Kestrel__Certificates__Default__Password=8b6039b6-c67a-448b-977b-0ce6d3fcfd49
# - Redis__Configuration=redis
# - RabbitMQ__Connections__Default__HostName=rabbitmq
# - RemoteServices__Catalog__BaseUrl=https://catalog-service
# - RemoteServices__Catalog__GrpcUrl=http://catalog-service
# - ConnectionStrings__AdministrationService=User ID=postgres;Password=myPassw0rd;Host=postgres-db;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;
# ports:
# - "44355:443"
# - ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80
- App__SelfUrl=https://eshop-st-basket
- App__CorsOrigins=https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-public-web
- RemoteServices__Catalog__BaseUrl=http://eshop-st-catalog:80
- RemoteServices__Catalog__GrpcUrl=http://eshop-st-catalog:81
- ConnectionStrings__AdministrationService=User ID=postgres;Password=myPassw0rd;Host=postgres-db;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;
- AuthServer__Authority=http://eshop-st-authserver
- AuthServer__RequireHttpsMetadata=false
- Redis__Configuration=redis
- RabbitMQ__Connections__Default__HostName=rabbitmq
depends_on:
redis:
condition: service_healthy
@ -249,7 +251,7 @@ services:
# - ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80;
- App__SelfUrl=https://eshop-st-authserver
- App__CorsOrigins=http://app-web,https://identity-service,https://eshop-st-administration,https://catalog-service,https://basket-service,https://ordering-service,https://payment-service
- App__CorsOrigins=http://app-web,https://eshop-st-public-web,https://identity-service,http://eshop-st-administration,https://eshop-st-administration,https://catalog-service,https://basket-service,https://ordering-service,https://payment-service
# - App__RedirectAllowedUrls=http://app-web
- AuthServer__Authority=http://eshop-st-authserver
- AuthServer__RequireHttpsMetadata=false
@ -271,26 +273,22 @@ services:
- eshoponabp-network
# volumes:
# - ./certs:/root/certificate
app-publicweb:
eshop-st-public-web:
image: eshoponabp/app-publicweb:latest
container_name: app-publicweb-container
build:
context: ../../
dockerfile: apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=https://+:443;http://+:80;
# - Kestrel__Certificates__Default__Path=/root/certificate/eshop-dk.pfx
# - Kestrel__Certificates__Default__Password=8b6039b6-c67a-448b-977b-0ce6d3fcfd49
# - Redis__Configuration=redis
# - RabbitMQ__Connections__Default__HostName=rabbitmq
# - App__SelfUrl=https://app-publicweb
- AuthServer__Authority=https://app-authserver
- AuthServer__RequireHttpsMetadata=true
# - RemoteServices__Default__BaseUrl=http://gateway-web-public
# - ReverseProxy__Clusters__cluster1__Destinations__destination1__Address=http://gateway-web-public
# ports:
# - "44335:443"
# - ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80;
- App__SelfUrl=https://eshop-st-public-web
- AuthServer__Authority=http://eshop-st-authserver
- AuthServer__RequireHttpsMetadata=false
- RemoteServices__Default__BaseUrl=http://eshop-st-gateway-web-public/
- Redis__Configuration=redis
- RabbitMQ__Connections__Default__HostName=rabbitmq
- ReverseProxy__Clusters__cluster1__Destinations__destination1__Address=http://eshop-st-gateway-web-public
depends_on:
redis:
condition: service_healthy
@ -299,8 +297,6 @@ services:
restart: on-failure
networks:
- eshoponabp-network
# volumes:
# - ./certs:/root/certificate
gateway-web:
image: eshoponabp/gateway-web:latest
container_name: gateway-web-container
@ -333,27 +329,26 @@ services:
- eshoponabp-network
# volumes:
# - ./certs:/root/certificate
gateway-web-public:
eshop-st-gateway-web-public:
image: eshoponabp/gateway-web-public:latest
container_name: gateway-web-public-container
build:
context: ../../
dockerfile: gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Docker # Yarp can't resolve dns, needs to be overridden
- ASPNETCORE_URLS=https://+:443;http://+:80;
# - Kestrel__Certificates__Default__Path=/root/certificate/eshop-dk.pfx
# - Kestrel__Certificates__Default__Password=8b6039b6-c67a-448b-977b-0ce6d3fcfd49
# - ASPNETCORE_ENVIRONMENT=Docker # Yarp can't resolve dns, needs to be overridden
- ASPNETCORE_URLS=http://+:80;
- App__SelfUrl=https://eshop-st-gateway-web-public
- AuthServer__Authority=http://eshop-st-authserver
- AuthServer__RequireHttpsMetadata=false
- Redis__Configuration=redis
- ReverseProxy__Clusters__accountCluster__Destinations__destination1__Address=http://app-authserver
- ReverseProxy__Clusters__administrationCluster__Destinations__destination1__Address=http://administration-service
- ReverseProxy__Clusters__catalogCluster__Destinations__destination1__Address=http://catalog-service
- ReverseProxy__Clusters__basketCluster__Destinations__destination1__Address=http://basket-service
- ReverseProxy__Clusters__orderingCluster__Destinations__destination1__Address=http://ordering-service
- ReverseProxy__Clusters__paymentCluster__Destinations__destination1__Address=http://payment-service
- ReverseProxy__Clusters__productPictureCluster__Destinations__destination1__Address=http://catalog-service
# ports:
# - "44373:443"
- ReverseProxy__Clusters__accountCluster__Destinations__destination1__Address=http://eshop-st-authserver
- ReverseProxy__Clusters__administrationCluster__Destinations__destination1__Address=http://eshop-st-administration
- ReverseProxy__Clusters__catalogCluster__Destinations__destination1__Address=http://eshop-st-catalog
- ReverseProxy__Clusters__basketCluster__Destinations__destination1__Address=http://eshop-st-basket
- ReverseProxy__Clusters__orderingCluster__Destinations__destination1__Address=http://eshop-st-ordering
- ReverseProxy__Clusters__paymentCluster__Destinations__destination1__Address=http://eshop-st-payment
- ReverseProxy__Clusters__productPictureCluster__Destinations__destination1__Address=http://eshop-st-catalog
depends_on:
redis:
condition: service_healthy
@ -362,8 +357,6 @@ services:
restart: on-failure
networks:
- eshoponabp-network
# volumes:
# - ./certs:/root/certificate
networks:
eshoponabp-network:

64
etc/docker/nginx/conf.d/default.conf

@ -42,4 +42,68 @@ server {
proxy_pass http://eshop-st-authserver:80;
proxy_set_header Host $host;
}
}
server {
listen 80;
listen 443 ssl;
server_name eshop-st-public-web;
ssl_certificate /etc/nginx/certs/eshop-st-web+10.pem;
ssl_certificate_key /etc/nginx/certs/eshop-st-web+10-key.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://eshop-st-public-web:80;
proxy_set_header Host $host;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
}
server {
listen 80;
listen 443 ssl;
server_name eshop-st-gateway-web-public;
ssl_certificate /etc/nginx/certs/eshop-st-web+10.pem;
ssl_certificate_key /etc/nginx/certs/eshop-st-web+10-key.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://eshop-st-gateway-web-public:80;
proxy_set_header Host $host;
}
}
server {
listen 80;
listen 443 ssl;
server_name eshop-st-basket;
ssl_certificate /etc/nginx/certs/eshop-st-web+10.pem;
ssl_certificate_key /etc/nginx/certs/eshop-st-web+10-key.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://eshop-st-basket:80;
proxy_set_header Host $host;
}
}
server {
listen 80;
listen 443 ssl;
server_name eshop-st-catalog;
ssl_certificate /etc/nginx/certs/eshop-st-web+10.pem;
ssl_certificate_key /etc/nginx/certs/eshop-st-web+10-key.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://eshop-st-catalog:80;
proxy_set_header Host $host;
}
}
Loading…
Cancel
Save