-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-redmine.yaml
122 lines (112 loc) · 2.36 KB
/
docker-compose-redmine.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
version: '3.1'
services:
redmine:
image: redmine
volumes:
- redmine_files:/usr/src/redmine/files
configs:
- source: redmine_config
target: /usr/src/redmine/config/configuration.yml
mode: 0444
secrets:
- tested
environment:
REDMINE_DB_MYSQL: db
REDMINE_DB_PASSWORD: example
networks:
- default
- web
deploy:
replicas: 2
placement:
constraints:
- node.role != master
- node.role == master
- node.hostname == prod2
- node.hostname != prod1
- node.labels.xxx == yyy
- node.labels.zzz
labels:
- 'traefik.frontend.rule=Host:REDACTED'
- 'traefik.port=3000'
- "traefik.frontend.headers.customResponseHeaders=Access-Control-Allow-Origin:*"
- "traefik.frontend.auth.basic.users=REDACTED"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.redirect.entryPoint=https"
- 'traefik.seg.frontend.rule=Host:REDACTED'
- 'traefik.seg.port=3001'
healthcheck:
disabled: false
test:
- CMD
- curl
- -f
- localhost:3000
start_period: 1m30s
interval: 30s
timeout: 2s
db:
image: mysql:5.7
volumes:
- db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: redmine
networks:
- default
deploy:
placement:
constraints:
- node.hostname == prod2
job:
kind: Job
image: alpine
entrypoint:
- bash
- -c
- sleep 1000
cronjob:
kind: CronJob
image: alpine
entrypoint:
- bash
- -c
- sleep 1000
CronJob:
spec:
schedule: '*/9 * * * *'
resource:
image: redis:alpine
deploy:
resources:
limits:
cpus: '0.50'
memory: 50M
reservations:
cpus: '0.25'
memory: 20M
toleration:
image: redis:alpine
deploy:
placement:
tolerations:
- key1=val1:NoExecute
- key2:NoSchedule
networks:
web:
external: true
volumes:
redmine_config:
redmine_files:
db:
driver_opts:
type: none
device: /path/to/db
configs:
redmine_config:
file: ./config.yml
secrets:
tested:
external: true
name: with_external_name
file: ./tested