-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yml
87 lines (83 loc) · 2.8 KB
/
deploy.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
# additions and changes to base.yml for deployment with swarm
# 1. deploy for typical production settings
# 2. provide host-mounted backup and restore directories
# 3. provide ssh keys for backup and drupal user to access shared private remote resources
# note: the deploy script will need to ensure the host directories exist/are created
version: '3.4'
services:
vsql:
environment:
- VSITE_ENVIRONMENT
labels:
simuliidae.environment: "{VSITE_ENVIRONMENT-Production}"
simuliidae.domain: "{VSITE_DOMAIN}"
simuliidae.civicrm.version: "{VSITE_CIVICRM_VER}"
deploy:
placement:
constraints:
- node.hostname=={VSITE_NODE-$THIS_NODE}
labels:
simuliidae.environment: "{VSITE_ENVIRONMENT-Production}"
simuliidae.domain: "{VSITE_DOMAIN}"
simuliidae.civicrm.version: "{VSITE_CIVICRM_VER}"
replicas: 1
resources:
limits:
cpus: "2"
memory: "{VSITE_SQL_MEMORY-4000M}"
restart_policy:
max_attempts: "2"
vhttp:
environment:
- VSITE_ENVIRONMENT
- VSITE_CIVIMAIL_SMTP_DEFAULT
labels:
simuliidae.environment: "{VSITE_ENVIRONMENT-Production}"
simuliidae.domain: "{VSITE_DOMAIN}"
simuliidae.civicrm.version: "{VSITE_CIVICRM_VER}"
deploy:
placement:
constraints:
- node.hostname=={VSITE_NODE-$THIS_NODE}
labels:
simuliidae.environment: "{VSITE_ENVIRONMENT-Production}"
simuliidae.domain: "{VSITE_DOMAIN}"
simuliidae.domainaliases: "{VSITE_DOMAIN_ALIASES}"
simuliidae.domainalternatives: "{VSITE_DOMAIN_ALTERNATIVES}"
simuliidae.civicrm.version: "{VSITE_CIVICRM_VER}"
replicas: 1
resources:
limits:
cpus: "2"
memory: "{VSITE_HTTP_MEMORY-500M}"
restart_policy:
max_attempts: "2"
admin:
environment:
- VSITE_ENVIRONMENT
- VSITE_CIVIMAIL_SMTP_DEFAULT
labels:
simuliidae.environment: "{VSITE_ENVIRONMENT-Production}"
simuliidae.domain: "{VSITE_DOMAIN}"
simuliidae.civicrm.version: "{VSITE_CIVICRM_VER}"
# volumes:
# - /var/backup/docker/{VSITE}/volume:/var/backup/volume
# - /var/backup/docker/{VSITE}/vsql:/var/backup/vsql
# - /{VSITE_ORIGIN_NODE}var/backup/docker/{VSITE}/:/var/restore/
# - /home/drupal/.ssh:/home/drupal/.ssh:ro
# - /home/backup/.ssh:/root/.backup-ssh:ro
deploy:
placement:
constraints:
- node.hostname=={VSITE_NODE-$THIS_NODE}
labels:
simuliidae.environment: "{VSITE_ENVIRONMENT-Production}"
simuliidae.domain: "{VSITE_DOMAIN}"
simuliidae.civicrm.version: "{VSITE_CIVICRM_VER}"
replicas: 1
resources:
limits:
cpus: "1"
memory: "2000M"
restart_policy:
condition: none