-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
87 lines (82 loc) · 2.09 KB
/
compose.yaml
File metadata and controls
87 lines (82 loc) · 2.09 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
services:
library-api:
container_name: library-api
build:
context: .
dockerfile: LibrarySystem.Api/Dockerfile
# ports:
# - "5000:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- GrpcSettings__ServiceUrl=http://library-grpc:8080
- ASPNETCORE_URLS=http://+:8080
depends_on:
- library-grpc
networks:
- library-net
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
library-grpc:
container_name: library-grpc
build:
context: .
dockerfile: LibrarySystem.Grpc/Dockerfile
# ports:
# - "5001:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8080
- ConnectionStrings__DefaultConnection=Host=db;Port=5432;Database=librarydb;Username=user;Password=${DB_PASSWORD:-changeme_in_prod}
depends_on:
db:
condition: service_healthy
networks:
- library-net
restart: unless-stopped
db:
container_name: library-db
image: postgres:16.11-alpine
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=${DB_PASSWORD:-changeme_in_prod}
- POSTGRES_DB=librarydb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U user -d librarydb" ]
interval: 5s
timeout: 5s
retries: 5
networks:
- library-net
restart: always
waf:
build:
context: ./waf
dockerfile: Dockerfile
container_name: library-waf
restart: unless-stopped
ports:
- "80:80"
- "9090:9090"
environment:
- BACKEND_HOST=library-api:8080
volumes:
- ./Waf/Caddyfile:/etc/caddy/Caddyfile
- ./Waf/coraza.conf:/etc/coraza/coraza.conf
- ./Waf/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf:/etc/coraza/crs/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
- ./logs/waf:/var/log/waf
depends_on:
- library-api
networks:
- library-net
volumes:
postgres_data:
networks:
library-net:
driver: bridge