2023-09-04 14:45:09 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Postgres DB for Pretix with Docker
|
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=-/usr/bin/docker rm --force {{ pretix_db_container_name }}
|
2023-09-05 11:30:03 +02:00
|
|
|
ExecStart=/usr/bin/docker run --name {{ pretix_db_container_name }} --network pretix --label com.centurylinklabs.watchtower.enable={WATCHTOWER_ENABLED} \
|
2023-09-04 14:45:09 +02:00
|
|
|
-v {{ docker_volumes_dir }}/pretix/postgres-db:/var/lib/postgresql/data --env-file {{ docker_volumes_dir }}/pretix/pretix-db.env postgres:15
|
|
|
|
ExecStop=/usr/bin/docker stop {{ pretix_db_container_name }}
|
|
|
|
Restart=always
|
|
|
|
RestartSec=15s
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|