-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
90 lines (84 loc) · 2.65 KB
/
docker-compose.yaml
File metadata and controls
90 lines (84 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
services:
postgres:
image: postgres:16
container_name: ECommerce.Database
environment:
POSTGRES_DB: ecommerce
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- 5432:5432
redis:
image: redis:7
container_name: ecommerce-redis
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
ports:
- "6379:6379"
mailhog:
image: mailhog/mailhog:latest
container_name: mailhog
ports:
- "1025:1025" # SMTP port
- "8025:8025" # Web UI port
# user-service:
# build:
# context: .
# dockerfile: src/Users/Users.Api/Dockerfile
# container_name: user-service
# environment:
# ASPNETCORE_ENVIRONMENT: Development
# ConnectionStrings__ECommerceDatabase: Host=postgres;Database=ecommerce;Username=postgres;Password=postgres
# ports:
# - "5001:5000"
# depends_on:
# postgres:
# condition: service_healthy
# product-service:
# build:
# context: .
# dockerfile: src/Products/Products.Api/Dockerfile
# container_name: product-service
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# environment:
# ASPNETCORE_ENVIRONMENT: Development
# ConnectionStrings__ECommerceDatabase: Host=postgres;Database=ecommerce;Username=postgres;Password=postgres
# USER_SERVICE_URL: http://user-service:5000
# INVENTORY_SERVICE_URL: http://inventory-service:5000
# ConnectionStrings__Redis: redis:6379,abortConnect=false
# ports:
# - "5002:5000"
# inventory-service:
# build:
# context: .
# dockerfile: src/Inventories/Inventories.Api/Dockerfile
# container_name: inventory-service
# depends_on:
# postgres:
# condition: service_healthy
# environment:
# ASPNETCORE_ENVIRONMENT: Development
# ConnectionStrings__DefaultConnection: Host=postgres;Database=ecommerce;Username=postgres;Password=postgres
# SERVICEIDENTITY_SETTINGS__ServiceIdentities__0__ClientId: product-service
# SERVICEIDENTITY_SETTINGS__ServiceIdentities__0__ClientSecret: product-service-secret-32bytes!!
# SERVICEIDENTITY_SETTINGS__ServiceIdentities__1__ClientId: order-service
# SERVICEIDENTITY_SETTINGS__ServiceIdentities__1__ClientSecret: order-service-secret-32bytes!!!!
# ports:
# - "5003:5000"
volumes:
postgres_data: