-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.swarm.yml
131 lines (131 loc) · 4.53 KB
/
docker-compose.swarm.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: '3.9'
services:
apollo:
image: vlauciani/caravel-apollo:${APOLLO_VERSION:-latest}
environment:
- PHP_MEMORY_LIMIT=2048M
volumes:
- v-caravel-apollo-storage:/app/storage
- /mnt/gfs/apollo/.env:/app/.env
ports:
- "8380:80"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:80/" ]
interval: 30s
timeout: 15s
retries: 3
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
update_config:
parallelism: 2
delay: 10s
order: start-first
hyp2000:
image: ingv/hyp2000:${HYP2000_DOCKERIMAGE_TAG:-latest}
volumes:
- v-caravel-apollo-storage:/app/storage
entrypoint: bash
command: -c "curl https://dl.google.com/go/go1.20.1.linux-amd64.tar.gz --output /tmp/go.tar.gz && tar -C /opt/ew_env -xzf /tmp/go.tar.gz && rm /tmp/go.tar.gz && PATH=\"$PATH:/opt/ew_env/go/bin\" && go install github.com/msoap/shell2http@latest && PATH=\"$PATH:$$(go env GOPATH)/bin\" && shell2http -port 8080 -form -include-stderr --shell=\"bash\" -cgi /get '. /home/ew/.bashrc && cd /app/storage/app/data/hyp2000/$${v_dir}/input && cat italy2000.hyp | hyp2000 > ../output/output.log 2> ../output/output.err && cd ../output && cat hypo.arc | tr \"\\0\" \" \" | ew2openapi TYPE_HYP2000ARC - hypo.json || (echo \"Status:503\\n\\n$$(cat /app/storage/app/data/hyp2000/$${v_dir}/output/output.err)\")'"
user: root
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/" ]
interval: 30s
timeout: 10s
retries: 3
deploy:
mode: replicated
replicas: 2
restart_policy:
condition: on-failure
update_config:
parallelism: 2
delay: 60s
order: start-first
pyml:
image: ingv/pyml:${PYML_DOCKERIMAGE_TAG:-latest}
volumes:
- v-caravel-apollo-storage:/app/storage
entrypoint: bash
command: -c "curl https://dl.google.com/go/go1.20.1.linux-amd64.tar.gz --output /tmp/go.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf /tmp/go.tar.gz && rm /tmp/go.tar.gz && PATH=\"$PATH:/usr/local/go/bin\" && go install github.com/msoap/shell2http@latest && PATH=\"$PATH:$$(go env GOPATH)/bin\" && shell2http -port 8080 -form -include-stderr -cgi /get '/opt/entrypoint.sh --in_file_name /app/storage/app/data/pyml/$${v_dir}/input.json --in_file_format json --out_format json > /app/storage/app/data/pyml/$${v_dir}/output.log 2>/app/storage/app/data/pyml/$${v_dir}/output.err || (echo \"Status:503\\n\\n$$(cat /app/storage/app/data/pyml/$${v_dir}/output/output.err)\")'"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/" ]
interval: 30s
timeout: 10s
retries: 3
deploy:
mode: replicated
replicas: 2
restart_policy:
condition: on-failure
update_config:
parallelism: 2
delay: 60s
order: start-first
#horizon:
# image: vlauciani/caravel-apollo-horizon:${APOLLO_VERSION:-latest}
# volumes:
# - v-caravel-apollo-storage:/app/storage
# - /mnt/gfs/apollo/.env:/app/.env
# deploy:
# mode: replicated
# replicas: 1
# restart_policy:
# condition: on-failure
# delay: 5s
# max_attempts: 3
# window: 120s
# healthcheck:
# test: [ "CMD", "php", "artisan", "horizon:status" ]
# interval: 30s
# timeout: 5s
# retries: 3
# start_period: 0s
mysql:
image: mysql/mysql-server:8.0
#ports:
# - '3306:3306'
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_HOST="%"
- MYSQL_ALLOW_EMPTY_PASSWORD=1
volumes:
- v-mysql-data:/var/lib/mysql
#- './docker/mysql/extra/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}" ]
retries: 3
timeout: 5s
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
redis:
image: redis:7.0.7
volumes:
- v-redis:/data
command: --requirepass r3d15
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
retries: 3
timeout: 5s
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
volumes:
v-redis:
v-mysql-data:
v-caravel-apollo-storage:
driver: local
driver_opts:
o: bind
device: /mnt/gfs/apollo/storage
type: none