-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
73 lines (66 loc) · 1.67 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
72
73
version: "3.9"
services:
db:
# Pulled Jan 12, 2023
image: postgres:15@sha256:6b07fc4fbcf551ea4546093e90cecefc9dc60d7ea8c56a4ace704940b6d6b7a3
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: leafy
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: leafy-nginx
build:
context: .
dockerfile: nginx.Dockerfile
web:
image: leafy
build: .
environment:
<<: *commonenv
depends_on: *dependsondb
command: ["web"]
ingress:
# Pulled Jan 12, 2023
image: nginx@sha256:b8f2383a95879e1ae064940d9a200f67a6c79e710ed82ac42263397367e7cc4e
volumes:
- ./ingress-nginx-default.conf:/etc/nginx/conf.d/default.conf
ports:
- "8000:80"
depends_on:
- nginx
- web
bot:
image: leafy
build: .
environment:
<<: *commonenv
TELEGRAM_TOKEN: "${TELEGRAM_TOKEN}"
depends_on: *dependsondb
command: ["bot"]
volumes:
pgdata: