Remove chown container from database
This commit is contained in:
parent
b3c4695cfc
commit
61999a32e1
@ -40,7 +40,6 @@
|
||||
loop:
|
||||
- "pod-database.service"
|
||||
- "container-database-postgres.service"
|
||||
- "container-database-pgadmin-chown.service"
|
||||
- "container-database-pgadmin.service"
|
||||
register: services_deploy_database_systemd_files
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
[Unit]
|
||||
Description=Podman container-database-pgadmin-chown.service
|
||||
Documentation=man:podman-generate-systemd(1)
|
||||
After=pod-database.service
|
||||
Before=container-database-pgadmin.service
|
||||
OnFailure=status-mail@%n.service
|
||||
|
||||
[Service]
|
||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||
TimeoutStopSec=70
|
||||
ExecStartPre=/bin/rm -f %t/container-database-pgadmin-chown.pid %t/container-database-pgadmin-chown.ctr-id
|
||||
ExecStart=/usr/bin/podman run \
|
||||
--conmon-pidfile %t/container-database-pgadmin-chown.pid \
|
||||
--cidfile %t/container-database-pgadmin-chown.ctr-id \
|
||||
--cgroups=no-conmon \
|
||||
--pod-id-file %t/pod-database.pod-id \
|
||||
--replace \
|
||||
-v {{ services_data_directory }}/pod-database/pgadmin/_data:/var/lib/pgadmin \
|
||||
-v ./.config/service/pgadmin.password:/run/secrets/pgadmin.password \
|
||||
--user=0 \
|
||||
--entrypoint="/bin/sh" \
|
||||
--name=pod-database-pgadmin-chown \
|
||||
docker.io/dpage/pgadmin4:{{ services_service_deploy_versions.pgadmin4 }} \
|
||||
-c "chown -R 5050:5050 /var/lib/pgadmin /run/secrets/pgadmin.password"
|
||||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-database-pgadmin-chown.ctr-id
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
WantedBy=container-database-pgadmin.service
|
@ -4,8 +4,7 @@ Documentation=man:podman-generate-systemd(1)
|
||||
Wants=network.target
|
||||
After=network-online.target
|
||||
BindsTo=pod-database.service container-database-postgres.service
|
||||
Requires=container-database-pgadmin-chown.service
|
||||
After=pod-database.service container-database-postgres.service container-database-pgadmin-chown.service
|
||||
After=pod-database.service container-database-postgres.service
|
||||
OnFailure=status-mail@%n.service
|
||||
|
||||
[Service]
|
||||
@ -23,8 +22,8 @@ ExecStart=/usr/bin/podman run \
|
||||
--log-driver=journald \
|
||||
-dt \
|
||||
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
|
||||
-v {{ services_data_directory }}/pod-database/pgadmin/_data:/var/lib/pgadmin \
|
||||
-v ./.config/service/pgadmin.password:/run/secrets/pgadmin.password:ro \
|
||||
-v {{ services_data_directory }}/pod-database/pgadmin/_data:/var/lib/pgadmin:U \
|
||||
-v ./.config/service/pgadmin.password:/run/secrets/pgadmin.password:U,ro \
|
||||
-e PGADMIN_DEFAULT_EMAIL="{{ services[services_service_name].pgadmin.email }}" \
|
||||
-e PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin.password \
|
||||
--name=pod-database-pgadmin \
|
||||
|
Loading…
Reference in New Issue
Block a user