mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-03-22 22:11:31 -04:00
migrate sites to central db
This commit is contained in:
parent
09fac5ab72
commit
5322e95d73
4 changed files with 39 additions and 26 deletions
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
volumePath = "/overseer/services";
|
||||
maintFile = lib.custom.relativeToRoot "assets/maint.html";
|
||||
in
|
||||
{
|
||||
systemd.tmpfiles.rules = [
|
||||
|
|
@ -13,26 +15,26 @@ in
|
|||
"d ${volumePath}/flamesites/nnsbluegrass 0750 crow"
|
||||
];
|
||||
|
||||
systemd.timers.flamesite-backup = {
|
||||
enable = true;
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "1hr";
|
||||
OnUnitActiveSec = "1hr";
|
||||
Unit = "flamesite-backup.service";
|
||||
};
|
||||
};
|
||||
# systemd.timers.flamesite-backup = {
|
||||
# enable = false;
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnBootSec = "1hr";
|
||||
# OnUnitActiveSec = "1hr";
|
||||
# Unit = "flamesite-backup.service";
|
||||
# };
|
||||
# };
|
||||
|
||||
systemd.services.flamesite-backup = {
|
||||
script = ''
|
||||
${pkgs.podman}/bin/podman exec swgal_db_1 sh -c 'exec mysqldump --no-tablespaces -usgr_user -psgr_pass sgr_db' > ${volumePath}/flamesites/swgalaxyproject/db.sql
|
||||
${pkgs.podman}/bin/podman exec nnsbluegrass_db_1 sh -c 'exec mysqldump --no-tablespaces -unns_user -pnns_pass nns_db' > ${volumePath}/flamesites/nnsbluegrass/db.sql
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "crow";
|
||||
};
|
||||
};
|
||||
# systemd.services.flamesite-backup = {
|
||||
# # ${pkgs.podman}/bin/podman exec swgal_db_1 sh -c 'exec mysqldump --no-tablespaces -usgr_user -psgr_pass sgr_db' > ${volumePath}/flamesites/swgalaxyproject/db.sql
|
||||
# # ${pkgs.podman}/bin/podman exec nnsbluegrass_db_1 sh -c 'exec mysqldump --no-tablespaces -unns_user -pnns_pass nns_db' > ${volumePath}/flamesites/nnsbluegrass/db.sql
|
||||
# script = ''
|
||||
# '';
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "crow";
|
||||
# };
|
||||
# };
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue