Skip to content

Commit

Permalink
Add --in-pod parameter for systemd commands
Browse files Browse the repository at this point in the history
systemd scripts depend an a pod to exist but this is not created unless the in-pod parameter is added
  • Loading branch information
ttsak committed Sep 16, 2023
1 parent bce40c2 commit 5af3d2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ def compose_systemd(compose, args):
f.write(f"{k}={v}\n")
print(f"writing [{fn}]: done.")
print("\n\ncreating the pod without starting it: ...\n\n")
process = subprocess.run([script, "up", "--no-start"], check=False)
process = subprocess.run([script, "--in-pod", proj_name, "up", "--no-start"], check=False)
print("\nfinal exit code is ", process.returncode)
username = getpass.getuser()
print(
Expand Down Expand Up @@ -2039,7 +2039,7 @@ def compose_systemd(compose, args):
[Service]
Type=simple
EnvironmentFile=%h/{stacks_dir}/%i.env
ExecStartPre=-{script} up --no-start
ExecStartPre=-{script} --in-pod %i up --no-start
ExecStartPre=/usr/bin/podman pod start pod_%i
ExecStart={script} wait
ExecStop=/usr/bin/podman pod stop pod_%i
Expand Down

0 comments on commit 5af3d2a

Please sign in to comment.