-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
85 lines (80 loc) · 2.07 KB
/
docker-compose.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
84
85
version: "3.7"
services:
mysql:
hostname: mysql
image: mysql:8
environment:
MYSQL_DATABASE: canopeum_db
MYSQL_ROOT_PASSWORD: Canopeum12345!@
MYSQL_USER: canopeum_user
MYSQL_PASSWORD: CanopeumUser12345!@
ports:
# Map the port to a non-default SQL port
- 3308:3306
volumes:
- mysql8-data:/var/lib/mysql
- mysql8-conf:/etc/mysql/conf.d
networks:
- internal-canopeum
backend:
hostname: backend
image: ghcr.io/beslogic/canopeum_backend:latest
command: uv run manage.py runserver 0.0.0.0:5001
ports:
- 5001:8000
depends_on:
- mysql
environment:
MYSQL_DATABASE: canopeum_db
MYSQL_HOST_CANOPEUM: /run/secrets/MYSQL_HOST_CANOPEUM
MYSQL_PORT_CANOPEUM: 3306
MYSQL_USER: canopeum_user
MYSQL_PASSWORD_CANOPEUM: /run/secrets/MYSQL_PASSWORD_CANOPEUM
SECRET_KEY_DJANGO_CANOPEUM: /run/secrets/SECRET_KEY_DJANGO_CANOPEUM
GOOGLE_API_KEY_CANOPEUM: /run/secrets/GOOGLE_API_KEY_CANOPEUM
DEBUG: "False"
VIRTUAL_HOST: api.canopeum.releaftrees.life
LETSENCRYPT_HOST: api.canopeum.releaftrees.life
volumes:
- media:/app/canopeum_backend/media
secrets:
- MYSQL_PASSWORD_CANOPEUM
- MYSQL_HOST_CANOPEUM
- SECRET_KEY_DJANGO_CANOPEUM
- GOOGLE_API_KEY_CANOPEUM
networks:
- internal-canopeum
- nginx-canopeum
frontend:
hostname: frontend
image: ghcr.io/beslogic/canopeum_frontend:latest
ports:
- 5000:80
environment:
VITE_API_BASE_URL: http://localhost:5001
NODE_ENV: production
VIRTUAL_HOST: releaftrees.life
LETSENCRYPT_HOST: releaftrees.life
networks:
- nginx-canopeum
volumes:
mysql8-data:
driver: local
mysql8-conf:
driver: local
media:
driver: local
secrets:
MYSQL_PASSWORD_CANOPEUM:
external: true
MYSQL_HOST_CANOPEUM:
external: true
SECRET_KEY_DJANGO_CANOPEUM:
external: true
GOOGLE_API_KEY_CANOPEUM:
external: true
networks:
internal-canopeum:
external: false
nginx-canopeum:
external: true