-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
65 lines (60 loc) · 1.63 KB
/
Copy pathcompose.yaml
File metadata and controls
65 lines (60 loc) · 1.63 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
name: secure-gitops-supply-chain
services:
postgres:
image: postgres:17.6-alpine@sha256:ef257d85f76e48da1c64832459b59fcaba1a4dac97bf5d7450c77753542eee94
environment:
POSTGRES_DB: ${POSTGRES_DB:-secure_supply_chain}
POSTGRES_USER: ${POSTGRES_USER:-app}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-local-development-only}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 3s
timeout: 3s
retries: 20
volumes:
- postgres-data:/var/lib/postgresql/data
networks: [backend]
api:
build:
context: .
dockerfile: app/api/Dockerfile
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql+psycopg://app:local-development-only@postgres:5432/secure_supply_chain}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health/ready')"]
interval: 3s
timeout: 3s
retries: 20
read_only: true
tmpfs: [/tmp]
security_opt: [no-new-privileges:true]
cap_drop: [ALL]
networks: [backend, frontend]
frontend:
build:
context: .
dockerfile: app/frontend/Dockerfile
depends_on:
api:
condition: service_healthy
ports:
- "8080:8080"
read_only: true
tmpfs:
- /tmp
- /var/cache/nginx
- /var/run
security_opt: [no-new-privileges:true]
cap_drop: [ALL]
networks: [frontend]
networks:
backend:
internal: true
frontend:
volumes:
postgres-data:
labels:
dev.secure-gitops/disposable: "true"