-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-swarmstack.yaml
More file actions
63 lines (58 loc) · 1.2 KB
/
docker-compose-swarmstack.yaml
File metadata and controls
63 lines (58 loc) · 1.2 KB
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
version: "3.4"
networks:
default:
external:
name: swarmstack_net
configs:
teampass_docker_start:
file: ./teampass-docker-start.sh
volumes:
teampass-data:
driver: pxd
driver_opts:
repl: 2
size: 2
teampass-php:
driver: pxd
driver_opts:
repl: 2
size: 1
teampass-mariadb:
driver: pxd
driver_opts:
repl: 2
size: 4
services:
teampass:
image: teampass/teampass
configs:
- source: teampass_docker_start
target: /teampass-docker-start.sh
deploy:
mode: replicated
placement:
constraints:
- node.Labels.storagegroup==RED
replicas: 1
environment:
VIRTUAL_HOST: fqdn.example.com
ports:
- "6443:80"
volumes:
- teampass-data:/var/www/html
- teampass-php:/var/php/session
db:
image: mariadb:10
deploy:
mode: replicated
placement:
constraints:
- node.Labels.storagegroup==RED
replicas: 1
environment:
MYSQL_ROOT_PASSWORD: mypass
MYSQL_DATABASE: teampass
MYSQL_PASSWORD: teampass
MYSQL_USER: teampass
volumes:
- teampass-mariadb:/var/lib/mysql