42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
version: "3"
|
|
|
|
vars:
|
|
TMP_DIR: /tmp/container-server
|
|
|
|
tasks:
|
|
mc-update:
|
|
desc: update minecraft mods
|
|
cmds:
|
|
- "docker exec -it -u amp -w /home/amp/.ampdata/instances/Main/Minecraft minecraft bash update_all.sh"
|
|
|
|
caddy-reload:
|
|
desc: Reload Caddy config
|
|
cmds:
|
|
- "docker exec -w /etc/caddy proxy caddy reload"
|
|
|
|
mail-setup:
|
|
desc: Docker-Mailserver setup utility
|
|
cmds:
|
|
- "docker exec -i mail setup {{.CLI_ARGS}}"
|
|
|
|
occ:
|
|
desc: Nextcloud cli
|
|
cmds:
|
|
- "docker exec -u 33 nextcloud php ./occ {{.CLI_ARGS}}"
|
|
|
|
psql-dump:
|
|
desc: Dump postgres database for backup or update
|
|
cmds:
|
|
- mkdir -p {{.TMP_DIR}}
|
|
- docker exec pg-{{.CLI_ARGS}} pg_dumpall -U {{.CLI_ARGS}} > {{.TMP_DIR}}/{{.CLI_ARGS}}.sql
|
|
- ls -la {{.TMP_DIR}}/{{.CLI_ARGS}}.sql
|
|
|
|
psql-restore:
|
|
desc: Load postgres database for restore
|
|
cmds:
|
|
- docker exec -i pg-{{.CLI_ARGS}} psql --echo-errors -U {{.CLI_ARGS}} < {{.TMP_DIR}}/{{.CLI_ARGS}}.sql
|
|
|
|
psql-clear-tmp:
|
|
desc: Clear temporary sql files created by psql-dump
|
|
cmds:
|
|
- rm -rv {{.TMP_DIR}}
|