-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (43 loc) · 908 Bytes
/
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
version: "3.9"
services:
client:
image: ${APP_NAME}_client
build:
context: ./client
container_name: ${APP_NAME}_client
command: pnpm prod
restart: unless-stopped
environment:
- VITE_PORT=${CLIENT_PORT}
- VITE_HMR_PORT=${CLIENT_HMR_PORT}
networks:
- common
server:
image: ${APP_NAME}_server
build:
context: ./server
container_name: ${APP_NAME}_server
command: pnpm start:prod
restart: unless-stopped
environment:
- PORT=${SERVER_PORT}
networks:
- common
nginx:
image: ${APP_NAME}_nginx
build:
context: ./nginx
container_name: ${APP_NAME}_nginx
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
depends_on:
- server
- client
networks:
- common
networks:
common:
name: ${APP_NAME}-network
driver: bridge