mirror of
https://github.com/oqyude/nixos.git
synced 2026-10-07 20:47:14 +03:00
Remove empty TODO.md (duplicate of todo.md on case-insensitive fs)
This commit is contained in:
@@ -181,14 +181,22 @@ containers."3xui_app" = {
|
|||||||
# or API) have their Reality public fields moved to top-level on the
|
# or API) have their Reality public fields moved to top-level on the
|
||||||
# next launch. The migration is idempotent — a no-op once fields are
|
# next launch. The migration is idempotent — a no-op once fields are
|
||||||
# top-level — so it's safe to run on every container start.
|
# top-level — so it's safe to run on every container start.
|
||||||
|
#
|
||||||
|
# The script is piped into the container via stdin rather than
|
||||||
|
# referenced by its host-side /nix/store path (which does not exist
|
||||||
|
# inside the container). Restart=on-failure so a transient container
|
||||||
|
# race (e.g. 3x-ui still seeding the DB on first start) is retried
|
||||||
|
# instead of silently passing.
|
||||||
"migrate-3xui-reality" = {
|
"migrate-3xui-reality" = {
|
||||||
path = [ pkgs.podman ];
|
path = [ pkgs.podman ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.podman}/bin/podman exec -i 3xui_app python3 ${migrateScript} || true
|
${pkgs.podman}/bin/podman exec -i 3xui_app python3 < ${migrateScript}
|
||||||
'';
|
'';
|
||||||
after = [ "podman-3xui_app.service" ];
|
after = [ "podman-3xui_app.service" ];
|
||||||
wantedBy = [ "podman-compose-3x-ui-root.target" ];
|
wantedBy = [ "podman-compose-3x-ui-root.target" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user