Get systemD services working.
This commit is contained in:
@@ -58,18 +58,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -71,18 +71,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -57,18 +57,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -94,18 +94,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -37,18 +37,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -60,18 +60,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -89,18 +89,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -65,18 +65,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
requires = [ "traefik.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
@@ -44,21 +44,20 @@ TRAEFIK_REF_NETWORKS
|
||||
|
||||
systemd.services.traefik = {
|
||||
description = "Podman container : ${container_name}";
|
||||
after = [ "network.target" ];
|
||||
requires = [ "numbus-activation-networked.service" "numbus-activation-chowned.service" ];
|
||||
after = [ "numbus-activation-networked.service" "numbus-activation-chowned.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.podman pkgs.podman-compose ];
|
||||
path = [ pkgs.podman ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "exec";
|
||||
# Pull the latest image before running
|
||||
ExecStartPre = "podman-compose -f /etc/${compose_file} pull";
|
||||
ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull";
|
||||
# Bring the service up
|
||||
ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans";
|
||||
# Take it down gracefully
|
||||
ExecStop = "podman-compose -f /etc/${compose_file} down";
|
||||
ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10m";
|
||||
StartLimitBurst = "3";
|
||||
|
||||
Reference in New Issue
Block a user