-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
131 lines (121 loc) · 2.73 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "3307:3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 5s
retries: 3
networks:
- everycare-network
redis:
image: redis:latest
container_name: redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- everycare-network
backend:
build:
context: .
dockerfile: Dockerfile
container_name: backend
environment:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
SPRING_SECURITY_USER_NAME: ${SPRING_SECURITY_USER_NAME}
SPRING_SECURITY_USER_PASSWORD: ${SPRING_SECURITY_USER_PASSWORD}
OPENAI_API_URL: ${OPENAI_API_URL}
CHATGPT_API_KEY: ${CHATGPT_API_KEY}
SPRING_REDIS_HOST: redis
SPRING_REDIS_PORT: 6379
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
volumes:
- .:/app
- ./logs:/var/log/spring-boot
ports:
- "8080:8080"
networks:
- everycare-network
frontend:
build:
context: ../frontend
dockerfile: Dockerfile
container_name: frontend
ports:
- "5173:5173"
volumes:
- ../frontend:/frontend
depends_on:
- backend
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true
command: >
sh -c "
npm install &&
npm run dev
"
networks:
- everycare-network
nginx:
image: nginx:alpine
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- frontend
expose:
- '80'
- '443'
networks:
- everycare-network
# flask:
# build:
# context: ../flask-server
# dockerfile: Dockerfile
# container_name: flask-server
# command: gunicorn --timeout 120 -w 4 -b 0.0.0.0:5000 app:app
# ports:
# - "5001:5000"
# environment:
# FLASK_APP: app.py
# FLASK_RUN_HOST: 0.0.0.0
# volumes:
# - ../flask-server:/flask-server
# depends_on:
# - mysql
# # - redis
# deploy:
# resources:
# limits:
# memory: 16g
# networks:
# - everycare-network
networks:
everycare-network:
driver: bridge
volumes:
mysql-data:
redis-data: