-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
111 lines (99 loc) · 2.64 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
version: "3.9"
services:
flask_server:
container_name: main_flask_server
image: tiangolo/uwsgi-nginx-flask:latest
ports:
- '5000:80' # external port : internal port
volumes:
- ./Servidor:/app # copy project to container
networks:
backend:
ipv4_address: 172.20.1.0
auth_database:
container_name: auth_database
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123
MYSQL_USER: admin
MYSQL_PASSWORD: admin
MYSQL_DATABASE: auth_DB
volumes:
- auth_db:/var/lib/mysql # data will be persisted here
- ./Servidor/Databases/auth_database.sql:/docker-entrypoint-initdb.d/auth_database.sql
networks:
backend:
ipv4_address: 172.20.1.1
cap_add: # handle the ```mbind: Operation not permitted``` error softly
- SYS_NICE
command: mysqld --sql_mode=""
adminer:
container_name: adminer
image: adminer
restart: always
ports:
- '8080:8080'
networks:
backend:
ipv4_address: 172.20.1.2
# check mySQL database addr (Server field):
# docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container_hash>
auth_server:
container_name: auth_flask_server
build:
context: .
dockerfile: ./Servidor/Auth_Server/Dockerfile
ports:
- '5005:80'
volumes:
- ./Servidor/Auth_Server:/app
environment:
JWT_SECRET_KEY: ThisIsMyKey
networks:
backend:
ipv4_address: 172.20.1.3
service_database:
container_name: service_database
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: 12345
MYSQL_USER: admin
MYSQL_PASSWORD: admin123
MYSQL_DATABASE: service_DB
volumes:
- service_db:/var/lib/mysql
- ./Servidor/Databases/service_database.sql:/docker-entrypoint-initdb.d/service_database.sql
ports:
- '3308:3308'
networks:
backend:
ipv4_address: 172.20.1.4
cap_add:
- SYS_NICE
command: mysqld --sql_mode=""
service_server:
container_name: service_flask_server
build:
context: .
dockerfile: ./Servidor/Service_Server/Dockerfile
ports:
- '5007:80'
volumes:
- ./Servidor/Service_Server:/app
environment:
JWT_SECRET_KEY: ThisIsMyKey
networks:
backend:
ipv4_address: 172.20.1.5
volumes:
auth_db:
service_db:
networks:
backend:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.1.0/16