Try to avoid Docker logs growing too much for one-off containers
We recently had a report of the Postgres backup container's log file growing the size of /var/lib/docker until it ran out of disk space. Trying to prevent similar problems in the future.
This commit is contained in:
@ -64,6 +64,7 @@
|
||||
set_fact:
|
||||
matrix_postgres_import_command: >-
|
||||
{{ matrix_host_command_docker }} run --rm --name matrix-postgres-import
|
||||
--log-driver=none
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
||||
--cap-drop=ALL
|
||||
--network={{ matrix_docker_network }}
|
||||
|
@ -74,6 +74,7 @@
|
||||
docker run
|
||||
--rm
|
||||
--name=matrix-synapse-migrate
|
||||
--log-driver=none
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
||||
--cap-drop=ALL
|
||||
--network={{ matrix_docker_network }}
|
||||
|
@ -80,6 +80,7 @@
|
||||
- name: Perform Postgres database dump
|
||||
command: >-
|
||||
{{ matrix_host_command_docker }} run --rm --name matrix-postgres-dump
|
||||
--log-driver=none
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
||||
--network={{ matrix_docker_network }}
|
||||
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql
|
||||
@ -124,6 +125,7 @@
|
||||
set_fact:
|
||||
matrix_postgres_import_command: >-
|
||||
{{ matrix_host_command_docker }} run --rm --name matrix-postgres-import
|
||||
--log-driver=none
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
||||
--cap-drop=ALL
|
||||
--network={{ matrix_docker_network }}
|
||||
|
Reference in New Issue
Block a user