2023-09-04 14:45:09 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Pretix with Docker
|
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
2023-09-04 16:47:31 +02:00
|
|
|
Requires=pretix-db.service
|
|
|
|
Requires=pretix-redis.service
|
2023-09-04 14:45:09 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=-/usr/bin/docker rm --force {{ pretix_container_name }}
|
|
|
|
ExecStart=/usr/bin/docker run --rm --name {{ pretix_container_name }} --network pretix \
|
|
|
|
--label com.centurylinklabs.watchtower.enable={WATCHTOWER_ENABLED} --env-file {{ docker_volumes_dir }}/pretix/pretix.env \
|
|
|
|
-v {{ docker_volumes_dir }}/pretix/data:/data \
|
|
|
|
-v {{ docker_volumes_dir }}/pretix/conf:/etc/pretix \
|
|
|
|
pretix/standalone:stable
|
2023-09-04 16:47:31 +02:00
|
|
|
ExecStartPost=/usr/bin/bash -c "/bin/sleep 10 && /usr/bin/docker network connect nginx_net {{ pretix_container_name }}"
|
2023-09-04 14:45:09 +02:00
|
|
|
ExecStop=/usr/bin/docker stop {{ watchtower_container_name }}
|
|
|
|
Restart=always
|
|
|
|
RestartSec=15s
|
2023-09-04 16:47:31 +02:00
|
|
|
Type=exec
|
2023-09-04 14:45:09 +02:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|