Skip to content

Commit

Permalink
#63 fixed shoppingcart statestore in bicep
Browse files Browse the repository at this point in the history
  • Loading branch information
thangchung committed Apr 29, 2022
1 parent f12f982 commit a94484b
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 72 deletions.
2 changes: 1 addition & 1 deletion deploys/bicep/dapr.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource environment 'Microsoft.App/managedEnvironments@2022-01-01-preview' exis
}

resource stateDaprComponent 'Microsoft.App/managedEnvironments/daprComponents@2022-01-01-preview' = {
name: '${environmentName}/state'
name: '${environmentName}/statestore'
dependsOn: [
environment
]
Expand Down
6 changes: 3 additions & 3 deletions src/web/app/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ const PRODUCT_SEARCH_URL = `${API_URL}/api-gw/product-catalog/api/products/searc
const CART_URL = `${API_URL}/api-gw/shopping-cart/api/carts`;

const axios = Axios.create({
// httpsAgent: new https.Agent({
// rejectUnauthorized: false,
// }),
httpsAgent: new https.Agent({
rejectUnauthorized: false,
}),
});

const storage = createCookieSessionStorage({
Expand Down
136 changes: 68 additions & 68 deletions tye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,76 +32,76 @@ services:
- port: 5001
protocol: https

# - name: inventoryapp
# dockerFile: src/rust/docker/Dockerfile-inventory
# dockerFileContext: src/rust/
# # image: inventoryapp
# env:
# - INVENTORY_HOST=0.0.0.0
# - INVENTORY_PORT=5002
# - PG_USER=postgres
# - PG_PASSWORD=P@ssw0rd
# - PG_INVENTORY_DATABASE=inv_db
# - PG_HOST=host.docker.internal
# - PG_PORT=5432
# - RUST_LOG="sqlx::query=error,tower_http=debug,info"
# - RUST_BACKTRACE=1
# bindings:
# - port: 5002
# containerPort: 5002
# protocol: http
- name: inventoryapp
dockerFile: src/rust/docker/Dockerfile-inventory
dockerFileContext: src/rust/
# image: inventoryapp
env:
- INVENTORY_HOST=0.0.0.0
- INVENTORY_PORT=5002
- PG_USER=postgres
- PG_PASSWORD=P@ssw0rd
- PG_INVENTORY_DATABASE=inv_db
- PG_HOST=host.docker.internal
- PG_PORT=5432
- RUST_LOG="sqlx::query=error,tower_http=debug,info"
- RUST_BACKTRACE=1
bindings:
- port: 5002
containerPort: 5002
protocol: http

# - name: productcatalogapp
# dockerFile: src/rust/docker/Dockerfile-product-catalog
# dockerFileContext: src/rust/
# # image: productcatalogapp
# env:
# - PRODUCT_CATALOG_HOST=0.0.0.0
# - PRODUCT_CATALOG_PORT=5003
# - PG_USER=postgres
# - PG_PASSWORD=P@ssw0rd
# - PG_PRODUCT_CATALOG_DATABASE=cat_db
# - PG_HOST=host.docker.internal
# - PG_PORT=5432
# - RUST_LOG="sqlx::query=error,tower_http=debug,info"
# - RUST_BACKTRACE=1
# - INVENTORY_CLIENT_URI=http://host.docker.internal:5002
# bindings:
# - port: 5003
# containerPort: 5003
# protocol: http
- name: productcatalogapp
dockerFile: src/rust/docker/Dockerfile-product-catalog
dockerFileContext: src/rust/
# image: productcatalogapp
env:
- PRODUCT_CATALOG_HOST=0.0.0.0
- PRODUCT_CATALOG_PORT=5003
- PG_USER=postgres
- PG_PASSWORD=P@ssw0rd
- PG_PRODUCT_CATALOG_DATABASE=cat_db
- PG_HOST=host.docker.internal
- PG_PORT=5432
- RUST_LOG="sqlx::query=error,tower_http=debug,info"
- RUST_BACKTRACE=1
- INVENTORY_CLIENT_URI=http://host.docker.internal:5002
bindings:
- port: 5003
containerPort: 5003
protocol: http

# - name: shoppingcartapp
# project: src/dotnet/shopping-cart/ShoppingCart.csproj
# bindings:
# - port: 5004
- name: shoppingcartapp
project: src/dotnet/shopping-cart/ShoppingCart.csproj
bindings:
- port: 5004

# - name: saleapp
# dockerFile: src/go/docker/Dockerfile-sale
# dockerFileContext: src/go/
# bindings:
# - port: 5005
# containerPort: 5005
# protocol: http
- name: saleapp
dockerFile: src/go/docker/Dockerfile-sale
dockerFileContext: src/go/
bindings:
- port: 5005
containerPort: 5005
protocol: http

# - name: web
# dockerFile: src/web/Dockerfile
# dockerFileContext: src/web
# env:
# - API_URL=https://host.docker.internal:5000
# bindings:
# - port: 3000
# containerPort: 3000
# protocol: http
- name: web
dockerFile: src/web/Dockerfile
dockerFileContext: src/web
env:
- API_URL=https://host.docker.internal:5000
bindings:
- port: 3000
containerPort: 3000
protocol: http

# - name: postgres
# image: postgres
# env:
# - name: POSTGRES_PASSWORD
# value: "P@ssw0rd"
# bindings:
# - port: 5432
# connectionString: Server=${host};Port=${port};User Id=postgres;Password=${env:POSTGRES_PASSWORD};
# volumes:
# - target: /docker-entrypoint-initdb.d/tye_postgres_init.sql
# source: tye_postgres_init.sql
- name: postgres
image: postgres
env:
- name: POSTGRES_PASSWORD
value: "P@ssw0rd"
bindings:
- port: 5432
connectionString: Server=${host};Port=${port};User Id=postgres;Password=${env:POSTGRES_PASSWORD};
volumes:
- target: /docker-entrypoint-initdb.d/tye_postgres_init.sql
source: tye_postgres_init.sql

0 comments on commit a94484b

Please sign in to comment.