Compare commits
6 Commits
2.0.0+2.0.
...
sqlite
| Author | SHA1 | Date | |
|---|---|---|---|
| 398c7ffefd | |||
| b51e8f8f45 | |||
| 436014726c | |||
| cc408eb56a | |||
| 65e0407ed7 | |||
| a2fc13d45b |
@ -8,7 +8,7 @@
|
||||
* **Status**: 0
|
||||
* **Image**: [`uptime-kuma`](https://hub.docker.com/r/uptime-kuma), 4, upstream
|
||||
* **Healthcheck**: No
|
||||
* **Backups**: No
|
||||
* **Backups**: Yes
|
||||
* **Email**: No
|
||||
* **Tests**: No
|
||||
* **SSO**: No
|
||||
|
||||
4
abra.sh
4
abra.sh
@ -1 +1,5 @@
|
||||
export APP_ENTRYPOINT_VERSION=v2
|
||||
|
||||
get_all_urls() {
|
||||
echo "select url from monitor" | mariadb -u kuma -p$(cat /run/secrets/db_password) -D kuma | sed 's|https://||' | sed 's|/.*||' | sort
|
||||
}
|
||||
|
||||
@ -15,6 +15,9 @@ services:
|
||||
- UPTIME_KUMA_DB_PASSWORD_FILE=/run/secrets/db_password
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
|
||||
db:
|
||||
image: mariadb:11.7
|
||||
@ -30,6 +33,12 @@ services:
|
||||
secrets:
|
||||
- db_password
|
||||
- db_root_password
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup: "${ENABLE_BACKUPS:-true}"
|
||||
backupbot.backup.pre-hook: "mariadb-dump --single-transaction -u root -p\"$$(cat /run/secrets/db_root_password)\" kuma | gzip > /var/lib/mysql/dump.sql.gz"
|
||||
backupbot.backup.volumes.mariadb.path: "dump.sql.gz"
|
||||
backupbot.restore.post-hook: "gzip -d /var/lib/mysql/dump.sql.gz && mariadb -u root -p\"$$(cat /run/secrets/db_root_password)\" kuma < /var/lib/mysql/dump.sql && rm -f /var/lib/mysql/dump.sql"
|
||||
|
||||
volumes:
|
||||
mariadb:
|
||||
|
||||
29
compose.yml
29
compose.yml
@ -6,16 +6,11 @@ services:
|
||||
image: louislam/uptime-kuma:2.0.0-beta.1
|
||||
volumes:
|
||||
- data:/app/data
|
||||
secrets:
|
||||
- db_password
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
environment:
|
||||
- UPTIME_KUMA_GH_REPO=louislam:uptime-kuma
|
||||
- UPTIME_KUMA_DB_TYPE=sqlite
|
||||
depends_on:
|
||||
- db
|
||||
configs:
|
||||
- source: app_entrypoint
|
||||
target: /docker-entrypoint.sh
|
||||
@ -42,37 +37,13 @@ services:
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 2m
|
||||
db:
|
||||
image: mariadb:11.7
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
||||
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
|
||||
- MYSQL_USER=kuma
|
||||
- MYSQL_DATABASE=kuma
|
||||
volumes:
|
||||
- mariadb:/var/lib/mysql
|
||||
networks:
|
||||
- internal
|
||||
secrets:
|
||||
- db_password
|
||||
- db_root_password
|
||||
|
||||
volumes:
|
||||
mariadb:
|
||||
data:
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
internal:
|
||||
|
||||
secrets:
|
||||
db_password:
|
||||
external: true
|
||||
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
||||
db_root_password:
|
||||
external: true
|
||||
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
|
||||
|
||||
configs:
|
||||
app_entrypoint:
|
||||
|
||||
Reference in New Issue
Block a user