-
Notifications
You must be signed in to change notification settings - Fork 47
/
compose-prod-local.yml
41 lines (38 loc) · 1.14 KB
/
compose-prod-local.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
services:
mysql:
restart: always
image: mysql:8.4.2
ports:
- "3308:3306"
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE_NAME}
- MYSQL_CHARSET=utf8mb4
- MYSQL_COLLATION=utf8mb4_0900_ai_ci
volumes:
- mysql_data:/var/lib/mysql
- ./mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./mysql/init-scripts:/docker-entrypoint-initdb.d
vite-vue3:
build:
target: vite-vue3-frontend
image: fullstack-blog-vite-vue3:latest
ports:
- "3000:80"
environment:
- BACKEND_PORT=8002
command: /bin/bash -c "envsubst '$$BACKEND_PORT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
express-server:
build:
target: express-backend
image: fullstack-blog-express:latest
ports:
- "8002:8002"
volumes:
- ./app/express-server/src/config/env.js:/usr/src/fullstack-blog/app/express-server/src/config/env.js
environment:
- NODE_ENV=production
- PORT=8002
volumes:
mysql_data: