-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-local-arm64.yaml
187 lines (179 loc) · 4.39 KB
/
docker-compose-local-arm64.yaml
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
version: "3.8"
services:
jacamo:
container_name: jacamo
build:
context: .
#dockerfile: Dockerfile_JACAMO
dockerfile: Dockerfile_GRADLE_arm64
tty: true # Container alive
#command: "/bin/sh -c 'gradle >> /shared_volume/netlogo_output/gradle_output.txt'"
ports:
- "3271:3271"
- "3272:3272"
- "3273:3273"
volumes:
- ./shared_volume:/shared_volume
- ./shared_volume/jacamo/jacamo_model:/home/gradle/project
environment:
- host=api
networks:
- my_network
depends_on:
- "model_1"
- "model_2"
- "api"
- "router"
- "clear_files"
api:
container_name: api
build:
context: .
dockerfile: Dockerfile_PYTHON
tty: true # Container alive
command: "python3 /shared_volume/api.py"
environment:
- PYTHONUNBUFFERED=1
ports:
- "5000:5000"
volumes:
- ./shared_volume:/shared_volume
networks:
- my_network
depends_on:
db:
condition: service_healthy
router:
container_name: router
build:
context: .
dockerfile: Dockerfile_PYTHON
tty: true # Container alive
command: "python3 /shared_volume/router.py"
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./shared_volume:/shared_volume
networks:
- my_network
depends_on:
db:
condition: service_healthy
db:
container_name: db
build:
context: .
dockerfile: Dockerfile_MYSQL_arm64
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
# MYSQL_DATABASE: MYSQL_DATABASE
# MYSQL_USER: MYSQL_USER
# MYSQL_PASSWORD: MYSQL_PASSWORD
healthcheck:
test: mysql --user=root --password=root -e 'select * from MYSQL_DATABASE.m1' MYSQL_DATABASE
volumes:
- ./shared_volume:/shared_volume
- ./shared_volume/db_file:/docker-entrypoint-initdb.d
ports:
- "9906:3306"
networks:
- my_network
depends_on:
- clear_files
clear_files:
container_name: clear_files
build:
context: .
dockerfile: Dockerfile_PYTHON
tty: true # Container alive
command: "python3 /shared_volume/clean_simulation_files.py"
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./shared_volume:/shared_volume
networks:
- my_network
phpmyadmin:
container_name: phpmyadmin
build:
context: .
dockerfile: Dockerfile_PHPMYADMIN_arm64
networks:
- my_network
ports:
- '8080:80'
restart: always
environment:
PMA_HOST: db
depends_on:
db:
condition: service_healthy
php:
container_name: php
build:
context: .
dockerfile: Dockerfile_PHP
tty: true # Container alive
environment:
- output_agents=${output_agents}
- host=api
ports:
- "80:80"
volumes:
- ./shared_volume:/var/www/html
- ./shared_volume:/shared_volume
depends_on:
db:
condition: service_healthy
networks:
- my_network
model_1:
container_name: model_1
build:
context: .
dockerfile: Dockerfile_NETLOGO
tty: true # Container alive
command: "/bin/sh -c 'python3 /shared_volume/python_execute_netlogo.py >> /shared_volume/netlogo_output/m1_output.txt'"
environment:
- PYTHONUNBUFFERED=1
- my_hostname=model_1
- model_file=/shared_volume/sugarscape_m1.nlogo
- experiment=experiment1
- auto_run=True
- host=api
volumes:
- ./shared_volume:/shared_volume
networks:
- my_network
depends_on:
- "router"
- "api"
- "clear_files"
model_2:
container_name: model_2
build:
context: .
dockerfile: Dockerfile_NETLOGO
tty: true # Container alive
command: "/bin/sh -c 'python3 /shared_volume/python_execute_netlogo.py >> /shared_volume/netlogo_output/m2_output.txt'"
environment:
- PYTHONUNBUFFERED=1
- my_hostname=model_2
- model_file=/shared_volume/sugarscape_m2.nlogo
- experiment=experiment1
- auto_run=True
- host=api
volumes:
- ./shared_volume:/shared_volume
networks:
- my_network
depends_on:
- "router"
- "api"
- "clear_files"
networks:
my_network:
name: my_network
driver: bridge