-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
72 lines (65 loc) · 1.38 KB
/
compose.yml
File metadata and controls
72 lines (65 loc) · 1.38 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
version: "0.0.1"
services:
nginx:
image: nginx:latest
container_name: app2_nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./test:/usr/share/nginx/html/test
networks:
- app1
- app2
app1_front:
image: nginx:latest
container_name: app1_front
volumes:
- ./app1/frontend/dist:/usr/share/nginx/html
networks:
- app1
app1_back:
image: backend_image:latest
container_name: app1_back
command: ['uvicorn', 'main:app', '--host', '0.0.0.0', '--port', '80']
volumes:
- ./app1/backend/code:/app
networks:
- app1
- database
app2_front:
image: nginx:latest
container_name: app2_front
volumes:
- ./app2/frontend/dist:/usr/share/nginx/html
networks:
- app2
app2_back:
image: backend_image:latest
container_name: app2_back
command: ['uvicorn', 'main:app', '--host', '0.0.0.0', '--port', '80']
volumes:
- ./app2/backend/code:/app
networks:
- app2
- database
db:
image: mysql:8.0
container_name: database
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
# ports:
# - 3306:3306
# - 33060:33060
networks:
- database
networks:
app1:
name: app1-proxy
driver: bridge
app2:
name: app2-proxy
driver: bridge
database: