-
Notifications
You must be signed in to change notification settings - Fork 0
/
stack.prod.yaml
79 lines (75 loc) · 1.61 KB
/
stack.prod.yaml
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
services:
http:
image: ghcr.io/cyberfatherrt/cpass_http
build:
context: .
target: final-http
cache_from:
- type=gha
cache_to:
- type=gha,mode=max
environment:
- ADDR=0.0.0.0:8000
- DATABASE_URL=postgres://postgres:pass@db:5432/cpass
depends_on:
- db
deploy:
replicas: 3
placement:
constraints: [node.role == worker]
grpc:
image: ghcr.io/cyberfatherrt/cpass_grpc
build:
context: .
target: final-grpc
cache_from:
- type=gha
cache_to:
- type=gha,mode=max
environment:
- ADDR=0.0.0.0:50051
- DATABASE_URL=postgres://postgres:pass@db:5432/cpass
depends_on:
- db
deploy:
replicas: 3
placement:
constraints: [node.role == worker]
proxy_worker:
image: ghcr.io/cyberfatherrt/cpass_proxy_worker
build:
context: proxy/nginx
args:
role: worker
depends_on:
- http
- grpc
deploy:
mode: global
placement:
constraints: [node.role == worker]
proxy_manager:
image: ghcr.io/cyberfatherrt/cpass_proxy_manager
build:
context: proxy/haproxy
args:
role: manager
ports:
- 80:80
- 443:443
- 50051:50051
depends_on:
- proxy_worker
deploy:
placement:
constraints: [node.role == manager]
db:
image: postgres:16.3-alpine3.20
user: postgres
environment:
- POSTGRES_DB=cpass
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pass
deploy:
placement:
constraints: [node.role == manager]