-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: adding multiple database flavors
- Loading branch information
1 parent
c22b9df
commit cad806b
Showing
38 changed files
with
428 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
generate-pfx: | ||
image: emberstack/openssl | ||
container_name: generate-pfx | ||
volumes: | ||
- ./certs:/https:rw | ||
command: > | ||
sh -c "[ -e "./https/devstore.academy-localhost.pfx" ] && echo File Already exist || ( | ||
rm /https/devstore.academy-localhost.pfx && | ||
openssl genrsa -out devstore.rsa 2048 && | ||
openssl req -sha256 -new -key devstore.rsa -out devstore.csr -subj '/CN=localhost' && | ||
openssl x509 -req -sha256 -days 365 -in devstore.csr -signkey devstore.rsa -out devstore.crt && | ||
openssl pkcs12 -export -out /https/devstore.academy-localhost.pfx -inkey devstore.rsa -in devstore.crt -password pass:9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe && | ||
rm devstore.rsa devstore.csr devstore.crt)" | ||
devstore-rabbit: | ||
image: rabbitmq:3-management | ||
container_name: devstore-rabbit | ||
ports: | ||
- 5672:5672 | ||
- 15672:15672 | ||
environment: | ||
RABBITMQ_DEFAULT_USER: "devstore" | ||
RABBITMQ_DEFAULT_PASS: "devstore" | ||
|
||
web-mvc: | ||
image: desenvolvedorio/devstore-web-mvc-ecommerce:latest | ||
container_name: devstore-web-mvc-ecommerce | ||
build: | ||
context: ../src | ||
dockerfile: ./web/DevStore.WebApp.MVC/Dockerfile | ||
restart: always | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Docker | ||
- ASPNETCORE_URLS=http://*:5001 | ||
- LC_ALL=en_US.UTF-8 | ||
- LANG=en_US.UTF-8 | ||
# Change the two lines above to your culture (ex pt_BR) | ||
volumes: | ||
- dpkeys:/var/data_protection_keys/ | ||
depends_on: | ||
- api-catalog | ||
- api-identity | ||
- api-customers | ||
- api-bff-checkout | ||
- generate-pfx | ||
|
||
database-devstore: | ||
image: mcr.microsoft.com/mssql/server:2017-latest | ||
container_name: database-devstore | ||
ports: | ||
- 1433:1433 | ||
environment: | ||
SA_PASSWORD: "MyDB@123" | ||
ACCEPT_EULA: "Y" | ||
|
||
api-identity: | ||
image: desenvolvedorio/devstore-api-identity:latest | ||
container_name: devstore-api-identity | ||
build: | ||
context: ../src | ||
dockerfile: ./services/DevStore.Identity.API/Dockerfile | ||
restart: always | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Docker | ||
ASPNETCORE_URLS: https://+:5101;http://+5102 | ||
ASPNETCORE_Kestrel__Certificates__Default__Password: 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe | ||
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/devstore.academy-localhost.pfx | ||
CUSTOMCONNSTR_DefaultConnection: "Server=database-devstore;Database=DSUsers;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123" | ||
AppSettings__DatabaseType: SqlServer | ||
volumes: | ||
- ./certs:/https:ro | ||
depends_on: | ||
- devstore-rabbit | ||
- database-devstore | ||
- generate-pfx | ||
|
||
api-cart: | ||
image: desenvolvedorio/devstore-api-cart:latest | ||
container_name: devstore-api-cart | ||
build: | ||
context: ../src | ||
dockerfile: ./services/DevStore.ShoppingCart.API/Dockerfile | ||
restart: always | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Docker | ||
ASPNETCORE_URLS: https://+:5201;http://+5202 | ||
ASPNETCORE_Kestrel__Certificates__Default__Password: 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe | ||
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/devstore.academy-localhost.pfx | ||
CUSTOMCONNSTR_DefaultConnection: "Server=database-devstore;Database=DSShoppingCart;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123" | ||
AppSettings__DatabaseType: SqlServer | ||
volumes: | ||
- ./certs:/https:ro | ||
depends_on: | ||
- devstore-rabbit | ||
- api-identity | ||
- database-devstore | ||
- generate-pfx | ||
|
||
api-catalog: | ||
image: desenvolvedorio/devstore-api-catalog:latest | ||
container_name: devstore-api-catalog | ||
build: | ||
context: ../src | ||
dockerfile: ./services/DevStore.Catalog.API/Dockerfile | ||
restart: always | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Docker | ||
ASPNETCORE_URLS: https://+:5301;http://+5302 | ||
ASPNETCORE_Kestrel__Certificates__Default__Password: 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe | ||
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/devstore.academy-localhost.pfx | ||
CUSTOMCONNSTR_DefaultConnection: "Server=database-devstore;Database=DSCatalog;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123" | ||
AppSettings__DatabaseType: SqlServer | ||
volumes: | ||
- ./certs:/https:ro | ||
depends_on: | ||
- devstore-rabbit | ||
- database-devstore | ||
- generate-pfx | ||
|
||
api-customers: | ||
image: desenvolvedorio/devstore-api-customers:latest | ||
container_name: devstore-api-customers | ||
build: | ||
context: ../src | ||
dockerfile: ./services/DevStore.Customers.API/Dockerfile | ||
restart: always | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Docker | ||
ASPNETCORE_URLS: https://+:5401;http://+5402 | ||
ASPNETCORE_Kestrel__Certificates__Default__Password: 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe | ||
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/devstore.academy-localhost.pfx | ||
CUSTOMCONNSTR_DefaultConnection: "Server=database-devstore;Database=DSCustomers;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123" | ||
AppSettings__DatabaseType: SqlServer | ||
volumes: | ||
- ./certs:/https:ro | ||
depends_on: | ||
- devstore-rabbit | ||
- api-identity | ||
- database-devstore | ||
- generate-pfx | ||
|
||
api-bff-checkout: | ||
image: desenvolvedorio/devstore-api-bff-checkout:latest | ||
container_name: devstore-api-bff-checkout | ||
build: | ||
context: ../src | ||
dockerfile: ./api-gateways/DevStore.Bff.Checkout/Dockerfile | ||
restart: always | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Docker | ||
ASPNETCORE_URLS: https://+:5501;http://+5502 | ||
ASPNETCORE_Kestrel__Certificates__Default__Password: 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe | ||
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/devstore.academy-localhost.pfx | ||
volumes: | ||
- ./certs:/https:ro | ||
depends_on: | ||
- devstore-rabbit | ||
- api-identity | ||
- api-cart | ||
- api-billing | ||
- api-order | ||
- generate-pfx | ||
|
||
api-billing: | ||
image: desenvolvedorio/devstore-api-billing:latest | ||
container_name: devstore-api-billing | ||
build: | ||
context: ../src | ||
dockerfile: ./services/DevStore.Billing.API/Dockerfile | ||
restart: always | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Docker | ||
ASPNETCORE_URLS: https://+:5601;http://+5602 | ||
ASPNETCORE_Kestrel__Certificates__Default__Password: 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe | ||
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/devstore.academy-localhost.pfx | ||
CUSTOMCONNSTR_DefaultConnection: "Server=database-devstore;Database=DSBilling;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123" | ||
AppSettings__DatabaseType: SqlServer | ||
volumes: | ||
- ./certs:/https:ro | ||
depends_on: | ||
- devstore-rabbit | ||
- api-identity | ||
- api-order | ||
- database-devstore | ||
- generate-pfx | ||
|
||
api-order: | ||
image: desenvolvedorio/devstore-api-order:latest | ||
container_name: devstore-api-order | ||
build: | ||
context: ../src | ||
dockerfile: ./services/DevStore.Orders.API/Dockerfile | ||
restart: always | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Docker | ||
ASPNETCORE_URLS: https://+:5701;http://+5702 | ||
ASPNETCORE_Kestrel__Certificates__Default__Password: 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe | ||
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/devstore.academy-localhost.pfx | ||
CUSTOMCONNSTR_DefaultConnection: "Server=database-devstore;Database=DSOrders;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123" | ||
AppSettings__DatabaseType: SqlServer | ||
volumes: | ||
- ./certs:/https:ro | ||
depends_on: | ||
- devstore-rabbit | ||
- database-devstore | ||
- api-identity | ||
- generate-pfx | ||
|
||
devstore-server: | ||
image: desenvolvedorio/devstore-server:latest | ||
container_name: devstore-server | ||
build: | ||
context: ./ | ||
dockerfile: ./nginx/Dockerfile | ||
restart: always | ||
volumes: | ||
- ./nginx/conf.d:/etc/nginx/conf.d:ro | ||
ports: | ||
- "7500:80" | ||
- "7501:443" | ||
depends_on: | ||
- web-mvc | ||
|
||
volumes: | ||
dpkeys: | ||
|
Oops, something went wrong.