-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
129 lines (120 loc) · 2.69 KB
/
Copy pathdocker-compose.yml
File metadata and controls
129 lines (120 loc) · 2.69 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
version: '3.8'
services:
mysql:
image: mysql:8
container_name: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "3306:3306"
command: >
--character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
volumes:
- db_data:/var/lib/mysql
- ./backend/src/main/resources/db/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./backend/src/main/resources/db/init_grants.sql:/docker-entrypoint-initdb.d/init_grants.sql
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 10s
retries: 5
networks:
- app-network
mongodb:
image: mongo:5
container_name: mongodb
restart: always
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- app-network
redis:
image: redis:7
container_name: redis
restart: always
ports:
- "6379:6379"
networks:
- app-network
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- mysql
- mongodb
- redis
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
app-network:
aliases:
- backend
s12p21c103_app-network:
aliases:
- backend
fastapi:
container_name: fastapi
build:
context: ./bigdata
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
APP_NAME: "gittowork"
DEBUG: "true"
depends_on:
- mysql
- mongodb
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
app-network:
aliases:
- fastapi
s12p21c103_app-network:
aliases:
- fastapi
nginx:
image: nginx:latest
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- /etc/letsencrypt:/etc/nginx/ssl:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on:
- backend
- fastapi
- mysql
- redis
- mongodb
networks:
- app-network
networks:
app-network:
driver: bridge
s12p21c103_app-network:
external: true
volumes:
db_data:
mongo_data: