-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathdocker-compose-pg-build.yml
83 lines (78 loc) · 1.85 KB
/
docker-compose-pg-build.yml
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
services:
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
restart: always
depends_on:
- postgres
environment:
- ALLOWED_HOSTS=backend,localhost
- CISO_ASSISTANT_URL=https://localhost:8443
- DJANGO_DEBUG=True
- POSTGRES_NAME=ciso_assistant
- POSTGRES_USER=ciso_assistant
- POSTGRES_PASSWORD=ciso_assistant
- DB_HOST=postgres
volumes:
- ./db:/code/db
huey:
container_name: huey
build:
context: ./backend
dockerfile: Dockerfile
depends_on:
- backend
restart: always
environment:
- ALLOWED_HOSTS=backend,localhost
- CISO_ASSISTANT_URL=https://localhost:8443
- DJANGO_DEBUG=False
- POSTGRES_NAME=ciso_assistant
- POSTGRES_USER=ciso_assistant
- POSTGRES_PASSWORD=ciso_assistant
- DB_HOST=postgres
volumes:
- ./db:/code/db
entrypoint:
- /bin/sh
- -c
- |
poetry run python manage.py run_huey -w 2 --scheduler-interval 60
frontend:
container_name: frontend
environment:
- PUBLIC_BACKEND_API_URL=http://backend:8000/api
- PROTOCOL_HEADER=x-forwarded-proto
- HOST_HEADER=x-forwarded-host
build:
context: ./frontend
dockerfile: Dockerfile
depends_on:
- backend
postgres:
container_name: postgres
image: postgres:16
restart: always
environment:
POSTGRES_DB: ciso_assistant
POSTGRES_USER: ciso_assistant
POSTGRES_PASSWORD: ciso_assistant
volumes:
- ./db/pg:/var/lib/postgresql/data
caddy:
container_name: caddy
image: caddy:2.8.4
restart: unless-stopped
ports:
- 8443:8443
command:
- caddy
- reverse-proxy
- --from
- https://localhost:8443
- --to
- frontend:3000
volumes:
- ./db:/data