This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinventory.yml
165 lines (140 loc) · 3.54 KB
/
inventory.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
---
version: "3.7"
## DSL Config
x-influxlog: &syslog
logging:
driver: syslog
options:
#syslog-address: "udp://{{.Node.Hostname}}:6154"
#syslog-address: "udp://{{.Swarm.NodeAddr}}:6154"
syslog-address: "udp://127.0.0.1:6154"
syslog-format: rfc5424micro
tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
x-replicas: &replicated
replicas: 1
x-global: &global
mode: global
x-worker: &worker
placement:
constraints: [node.role == worker]
x-manager: &manager
placement:
constraints: [node.role == manager]
x-restart: &on-failure
restart_policy:
condition: on-failure
max_attempts: 3
delay: 5s
rollback_config:
parallelism: 2
delay: 10s
monitor: 10s
order: start-first
failure_action: continue
update_config:
parallelism: 2
delay: 10s
monitor: 10s
order: start-first
failure_action: rollback
x-stop-grace: &stopperiod
stop_grace_period: 30s
x-default-healthcheck: &heathcheck-pass
test: ["CMD", "exit 0"]
interval: 25s
timeout: 5s
retries: 3
x-traefik-off: &traefik-off
traefik.enabled: "false"
x-traefik-on: &traefik-on
traefik.enabled: "true"
traefik.frontend.errors.network.backend: "error"
traefik.frontend.errors.network.query: "/"
traefik.frontend.errors.network.status: "404,500-511"
traefik.frontned.entrypoints: 'http,https,ws,wss'
traefik.frontend.priority: "5"
traefik.port: "80"
x-default-route: &default-route
<<: *traefik-on
traefik.frontend.rule: "HostRegexp:{catchall:.*}"
traefik.frontend.priority: "1"
#<<: *traefik-default-frontend
x-vhost-route: &vhost-route
<<: *traefik-on
traefik.frontend.priority: "10"
x-orbiter-disable: &orbiter-off
orbiter: "false"
<<: *traefik-off
x-orbiter-enable: &orbiter-on
orbiter: "true"
orbiter.up: "3"
orbiter.down: "1"
<<: *traefik-on
configs: {}
networks:
internal:
external: true
name: internal
default:
external: true
name: ${DEFAULT_NETWORK}
volumes:
postgresql: {}
addons: {}
etc: {}
services:
db:
image: postgres:11
# container_name: postgres11
environment:
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- POSTGRES_DB=postgres
networks:
- internal
deploy:
<<: *replicated
<<: *on-failure
placement:
constraints:
- node.role == worker
- node.labels.net.matrix.role == database
labels:
<<: *global
<<: *orbiter-off
volumes:
- postgresql:/var/lib/postgresql/data
inventory:
deploy:
<<: *replicated
<<: *on-failure
placement:
constraints:
- node.role == worker
- node.labels.net.matrix.role == application services
labels:
<<: *vhost-route
<<: *orbiter-on
<<: *global
traefik.port: "8069"
traefik.frontend.rule: "Host:inventory.${DOMAINNAME}"
networks:
- internal
- default
image: odoo:13
depends_on:
- db
ports:
- "8069/tcp"
tty: true
stdin_open: true
command: -- --dev=reload
environment:
- HOST=db
- USER=odoo
- PASSWORD=odoo
volumes:
- addons:/mnt/extra-addons
- etc:/etc/odoo
...
# vim: set sts=2 sw=2 ts=2 et ai: