From 0db8b0afadb62a46e549286dff9185e5dc92fad6 Mon Sep 17 00:00:00 2001 From: kemboi22 Date: Sat, 3 Aug 2024 22:58:03 +0300 Subject: [PATCH] feat: added caddy-app.service --- .../actions/configure-module/10configure_environment_vars | 2 +- imageroot/systemd/user/caddy-app.service | 2 +- imageroot/systemd/user/chibisafe-app.service | 2 +- imageroot/systemd/user/chibisafe-server.service | 2 +- imageroot/systemd/user/chibisafe.service | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/imageroot/actions/configure-module/10configure_environment_vars b/imageroot/actions/configure-module/10configure_environment_vars index ff70e6c..1bf4e98 100755 --- a/imageroot/actions/configure-module/10configure_environment_vars +++ b/imageroot/actions/configure-module/10configure_environment_vars @@ -17,7 +17,7 @@ data = json.load(sys.stdin) HOST = data.get('host') chibi = { "BASE_API_URL": 'chibisafe-server:8000', - "BASE_URL": ":80" + "BASE_URL": "https://"+HOST } agent.write_envfile('chibi.env', chibi) #agent.dump_env() diff --git a/imageroot/systemd/user/caddy-app.service b/imageroot/systemd/user/caddy-app.service index cbc74d5..d507f9c 100644 --- a/imageroot/systemd/user/caddy-app.service +++ b/imageroot/systemd/user/caddy-app.service @@ -6,7 +6,7 @@ [Unit] Description=Podman caddy-app.service BindsTo=chibisafe.service -After=chibisafe.service chibisafe-server.service chibisafe-app.service caddy-app.service +After=chibisafe.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n diff --git a/imageroot/systemd/user/chibisafe-app.service b/imageroot/systemd/user/chibisafe-app.service index b9c281d..1479585 100644 --- a/imageroot/systemd/user/chibisafe-app.service +++ b/imageroot/systemd/user/chibisafe-app.service @@ -6,7 +6,7 @@ [Unit] Description=Podman chibisafe-app.service BindsTo=chibisafe.service -After=chibisafe.service chibisafe-server.service +After=chibisafe.service caddy-app.service chibisafe-server.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n diff --git a/imageroot/systemd/user/chibisafe-server.service b/imageroot/systemd/user/chibisafe-server.service index b1e26fd..66c6f16 100644 --- a/imageroot/systemd/user/chibisafe-server.service +++ b/imageroot/systemd/user/chibisafe-server.service @@ -6,7 +6,7 @@ [Unit] Description=Podman chibisafe-server.service BindsTo=chibisafe.service -After=chibisafe.service +After=chibisafe.service caddy-app.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n diff --git a/imageroot/systemd/user/chibisafe.service b/imageroot/systemd/user/chibisafe.service index d89a3f6..4ceb7b1 100644 --- a/imageroot/systemd/user/chibisafe.service +++ b/imageroot/systemd/user/chibisafe.service @@ -10,8 +10,8 @@ [Unit] Description=Podman chibisafe.service -Requires=chibisafe-server.service chibisafe-app.service -Before=chibisafe-server.service chibisafe-app.service +Requires=chibisafe-server.service chibisafe-app.service caddy-app.service +Before=chibisafe-server.service chibisafe-app.service caddy-app.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n @@ -22,7 +22,7 @@ ExecStartPre=/bin/rm -f %t/chibisafe.pid %t/chibisafe.pod-id ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/chibisafe.pid \ --pod-id-file %t/chibisafe.pod-id \ --name chibisafe \ - --publish 127.0.0.1:${TCP_PORT}:8001 \ + --publish 127.0.0.1:${TCP_PORT}:80 \ --replace ExecStart=/usr/bin/podman pod start --pod-id-file %t/chibisafe.pod-id ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/chibisafe.pod-id -t 10