-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (102 loc) · 2.31 KB
/
docker-compose.yml
File metadata and controls
109 lines (102 loc) · 2.31 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
services:
nginx:
build: ./nginx
container_name: nginx
ports:
- "${NGINX_HTTP_PORT}:80"
- "${NGINX_HTTPS_PORT}:443"
volumes:
- /etc/letsencrypt:/etc/letsencrypt:ro
- /etc/ssl/certs:/etc/ssl/certs:ro
- ./nginx/conf.d:/etc/nginx/conf.d:rw
- ./nginx/logs:/var/log/nginx
depends_on:
- frontend
- backend
- ai
networks:
- undaied
restart: always
environment:
- TZ=${TZ}
frontend:
build: ./FE
container_name: frontend
expose:
- "${FRONTEND_PORT}"
networks:
- undaied
restart: always
environment:
- TZ=${TZ}
backend:
build: ./BE/undaid
container_name: backend
expose:
- "${BACKEND_HTTP_PORT}"
- "${BACKEND_SOCKET_PORT}"
depends_on:
mysql:
condition: service_started
redis:
condition: service_started
environment:
SPRING_DATASOURCE_URL: "jdbc:mysql://mysql:3306/${MYSQL_DATABASE}"
SPRING_DATASOURCE_USERNAME: ${MYSQL_USER}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
SPRING_DATA_REDIS_HOST: ${SPRING_DATA_REDIS_HOST}
SPRING_DATA_REDIS_PORT: ${SPRING_DATA_REDIS_PORT}
SPRING_REDIS_PASSWORD: ${REDIS_PASSWORD}
SERVER_PORT: ${BACKEND_HTTP_PORT}
BACKEND_SOCKET_PORT: ${BACKEND_SOCKET_PORT}
AI_SERVER_URL: ${AI_SERVER_URL}
TZ: ${TZ}
networks:
- undaied
restart: always
ai:
build: ./AI
container_name: ai
expose:
- "${AI_PORT}"
environment:
- AI_PORT=${AI_PORT}
- TZ=${TZ}
networks:
- undaied
restart: always
mysql:
build:
context: ./mysql
container_name: mysql
expose:
- "${MYSQL_PORT}"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: ${TZ}
MYSQL_INIT_COMMAND: "${MYSQL_INIT_COMMAND}"
volumes:
- mysql_data:/var/lib/mysql
networks:
- undaied
restart: always
redis:
build: ./redis
container_name: redis
expose:
- "${REDIS_PORT}"
volumes:
- redis_data:/data
networks:
- undaied
restart: always
volumes:
mysql_data:
redis_data:
networks:
undaied:
external: true