-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
71 lines (65 loc) · 1.73 KB
/
compose.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
services:
db:
# Pulled Apr 24, 2023
image: postgres:15@sha256:6cc97262444f1c45171081bc5a1d4c28b883ea46a6e0d1a45a8eac4a7f4767ab
environment:
POSTGRES_PASSWORD: "123456"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready --username=postgres"]
interval: 5s
timeout: 10s
retries: 5
start_period: 80s
migrate:
image: open-pension-ng
build: .
restart: on-failure
environment: &commonenv
DJANGO_SECRET_KEY: "#-@^btdzoe9n-swq=fx5(db5^ibkqsytrt0ie2n55efz7wtpk#"
DEBUG: "True"
DJANGO_DATABASE_ENGINE: "postgres"
DJANGO_DATABASE_NAME: "postgres"
DJANGO_DATABASE_USER: "postgres"
DJANGO_DATABASE_PASSWORD: "123456"
DJANGO_DATABASE_HOST: "db"
DJANGO_DATABASE_PORT: "5432"
DJANGO_ALLOWED_HOSTS: "*"
DJANGO_CSRF_TRUSTED_ORIGINS: "http://localhost:8000"
depends_on: &dependsondb
db:
condition: service_healthy
command: ["migrate"]
nginx:
image: open-pension-ng-nginx
build:
context: .
dockerfile: nginx.Dockerfile
web:
image: open-pension-ng
build: .
environment:
<<: *commonenv
depends_on: *dependsondb
command: ["web"]
ingress:
# Pulled Apr 24, 2023
image: nginx@sha256:63b44e8ddb83d5dd8020327c1f40436e37a6fffd3ef2498a6204df23be6e7e94
volumes:
- ./ingress-nginx-default.conf:/etc/nginx/conf.d/default.conf
ports:
- "8000:80"
depends_on:
- nginx
- web
# qcluster:
# image: open-pension-ng
# build: .
# environment:
# <<: *commonenv
# DJANGO_Q_CLUSTER_SETTINGS_JSON: '{"workers": 2}'
# depends_on: *dependsondb
# command: ["qcluster"]
volumes:
pgdata: