[systemd] Make the docker part of django@ work

This commit is contained in:
2026-04-09 17:05:22 -04:00
parent 7c9ad06f00
commit 20a063b9e2

View File

@ -7,7 +7,7 @@ Wants=network-online.target
Type=simple Type=simple
Environment=PATH=%h/.local/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin Environment=PATH=%h/.local/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
EnvironmentFile=%h/.local/etc/django/%i.env EnvironmentFile=%h/.local/etc/django/%i.env
ExecStartPre=/bin/bash -lc 'cd "$DJANGO_PATH" && if [ -f docker-compose.yml ]; then docker-compose up -d; fi' ExecStartPre=/bin/bash -lc 'cd "$DJANGO_PATH" && if [ -f docker-compose.yml ]; then docker-compose start; fi'
ExecStart=/bin/bash -c 'cd "$DJANGO_PATH" && exec direnv exec "$DJANGO_PATH" just django' ExecStart=/bin/bash -c 'cd "$DJANGO_PATH" && exec direnv exec "$DJANGO_PATH" just django'
Restart=on-failure Restart=on-failure
RestartSec=2 RestartSec=2