-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloud-init.yaml.example
118 lines (109 loc) · 3.07 KB
/
cloud-init.yaml.example
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
write_files:
- path: /root/.env
content: |
SITE_ADDRESS=example.org
LOG_LEVEL=10
POSTGRES_DB=gatus
POSTGRES_USER=postgres
POSTGRES_PASSWORD=CHANGE_ME
POSTGRES_HOSTNAME_GATUS=gatusdb
POSTGRES_HOSTNAME_MONITORING=monitoringdb
POSTGRES_DB_MONITORING=postgres
NUMBER_OF_SERVERS=50
- path: /root/Caddyfile
content: |
https://{$SITE_ADDRESS}/* {
reverse_proxy http://gatus:9999
}
https://api.{$SITE_ADDRESS}/* {
reverse_proxy http://api:8888
}
- path: /root/docker-compose.yaml
content: |
version: '3.7'
volumes:
caddy_data:
caddy_config:
gatus_config:
gatus_data:
monitoring_data:
services:
#Monitor
gatus:
depends_on:
- gatus_db
image: twinproduction/gatus:latest
volumes:
- gatus_config:/config
# Caddy Proxy
caddy:
depends_on:
- api
- gatus
env_file: .env
image: caddy:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
- 443:443/udp
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
api:
environment:
- DOCKER=1
depends_on:
- monitoring_db
- gatus_db
env_file: .env
image: ghcr.io/jelloeater/fedi_gatus:latest
entrypoint: [ "python3", "fedi_gatus/api_server/__main__.py" ]
config:
depends_on:
- monitoring_db
env_file: .env
environment:
- DOCKER=1
image: ghcr.io/jelloeater/fedi_gatus:latest
volumes:
- gatus_config:/app/fedi_gatus/config_gen/config:rw
entrypoint: [ "python3", "fedi_gatus/config_gen" ]
gatus_db:
hostname: gatusdb
image: postgres
env_file: .env
volumes:
- gatus_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
interval: 10s
timeout: 3s
retries: 3
monitoring_db:
hostname: monitoringdb
image: postgres
env_file: .env
volumes:
- gatus_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
interval: 10s
timeout: 3s
retries: 3
updater:
environment:
- DOCKER=1
depends_on:
- monitoring_db
env_file: .env
image: ghcr.io/jelloeater/fedi_gatus:latest
entrypoint: [ "python3", "fedi_gatus/updater" ]
runcmd:
- cd /root
- docker-compose up -d monitoring_db
- docker-compose up updater # Block for config setup
- docker-compose up config
- docker-compose up -d caddy