-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (52 loc) · 1.53 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
#Run locally: CI_REGISTRY=gitlab.lrz.de:5005 CI_PROJECT_NAMESPACE=proteomics/container CI_PROJECT_NAME=enrichment-server CI_COMMIT_REF_SLUG=latest docker compose up
version: '3.6'
services:
enrichment_server:
restart: unless-stopped
environment:
- CI_REGISTRY
- CI_PROJECT_NAMESPACE
- CI_PROJECT_NAME
- CI_COMMIT_REF_SLUG
- CI_DEPLOY_TAG
- CI_DEPLOY_NETWORK
- CI_PUBLISH
- PRODUCTION=1
- PORT=4321
build: . #TODO: CI prints 'Ignoring unsupported options: build', not sure if I need this
image: "${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}"
networks:
- INTERNAL
- EXTERNAL
ports:
- "4321:4321"
deploy:
mode: replicated
replicas: 3
restart_policy:
condition: on-failure
delay: 2s
max_attempts: 5
window: 10s
update_config:
parallelism: 1
delay: 5s
order: start-first
labels:
- "traefik.port=4321"
- "traefik.backend=${CI_COMMIT_REF_SLUG}_${CI_PROJECT_NAME}"
- "traefik.frontend.rule=PathPrefixStrip:/${CI_COMMIT_REF_SLUG}_${CI_PROJECT_NAME}/"
- "traefik.backend.loadbalancer.sticky=true"
- "traefik.tags=${CI_COMMIT_REF_SLUG},${CI_DEPLOY_TAG},${CI_PUBLISH}"
- "traefik.docker.network=EXTERNAL"
resources:
limits:
memory: 24000M
cpus: '16'
reservations:
memory: 5000M
networks:
EXTERNAL:
external: true
INTERNAL:
external: true