Compare commits

...

5 Commits
main ... demo

Author SHA1 Message Date
Bryan Joshua Pedini e201ec61a6 removed network for container cron, not needed
removes the necessity for a useless network <projectname>_default
2023-04-22 23:39:27 +02:00
Bryan Joshua Pedini 448ef73f1c removed default.db, added default.db in .gitignore
nyx uses domains, default was created on a test domain, it makes no sense including it in the repo
2023-04-16 09:26:33 +02:00
Bryan Joshua Pedini 3b009f6c12 fixed permissions in nyx-reset script
added ability to launch containers as root (as the repo would be owned by root, hence the `-a` made no difference), now the permission get set correctly
2023-04-07 14:43:50 +02:00
Bryan Joshua Pedini ae9fcde814 fixed crontab resetting every 5 minutes instead of 6 hours (development) 2023-04-07 14:38:40 +02:00
Bryan Joshua Pedini 44d4cae317 added demo-specific deployment environment and directives 2023-04-07 14:35:50 +02:00
5 changed files with 29 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.env
data
default.db

3
crontab Normal file
View File

@ -0,0 +1,3 @@
# do daily/weekly/monthly maintenance
# min hour day month weekday command
* */6 * * * /jobs/nyx-reset.sh

View File

@ -0,0 +1,11 @@
---
services:
cron:
image: bryanpedini/dockercron:${CRON_VERSION}
restart: unless-stopped
network_mode: none
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${CRON_CRONTAB}:/crontab/root
- ${CRON_JOBS}:/jobs
- ${NYX_DEMO}:/opt/nyx

View File

@ -20,3 +20,10 @@ DIUN_EXCLUDE=
# Nyx
NYX_VERSION=latest
NYX_DATA=./data
NYX_DEMO=/path/to/nyx-demo
# ^ where your docker-compose.override.yml resides for the demo deployment
# Cron
CRON_VERSION=1.0-alpine3.16
CRON_CRONTAB=./crontab
CRON_JOBS=./jobs

7
jobs/nyx-reset.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env sh
cd /opt/nyx
docker compose stop nyx
cp default.db data/data/data.db
chown 1000:1000 data/data/data.db
docker compose start nyx