Compare commits

..

8 Commits

30 changed files with 149 additions and 88 deletions

View File

@ -146,6 +146,7 @@ domains_wordpress: ["wordpress.{{top_domain}}","blog.{{top_domain}}
postgres_default_version: "16" postgres_default_version: "16"
### Docker Role Specific Parameters ### Docker Role Specific Parameters
docker_restart_policy: "unless-stopped"
#### Akaunting #### Akaunting
version_akaunting: "latest" version_akaunting: "latest"
@ -153,6 +154,9 @@ akaunting_company_name: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
akaunting_company_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED" akaunting_company_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
akaunting_setup_admin_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED" akaunting_setup_admin_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
#### Big Blue Button
bigbluebutton_enable_greenlight: "false"
#### Listmonk #### Listmonk
listmonk_admin_username: "admin" listmonk_admin_username: "admin"

View File

@ -10,8 +10,8 @@ parser.add_argument('--maximum-backup-size-percent', type=int, dest='maximum_bac
parser.add_argument('--backups-folder-path',type=str,dest='backups_folder_path',required=True, help="The folder in which the backups are stored") parser.add_argument('--backups-folder-path',type=str,dest='backups_folder_path',required=True, help="The folder in which the backups are stored")
args = parser.parse_args() args = parser.parse_args()
def print_used_disc_space(): def print_used_disc_space(backups_folder_path):
print("%d %% of disk %s are used" % (psutil.disk_usage(args.backups_folder_path).percent,args.backups_folder_path)) print("%d %% of disk %s are used" % (psutil.disk_usage(backups_folder_path).percent,backups_folder_path))
def is_directory_used_by_another_process(directory_path): def is_directory_used_by_another_process(directory_path):
command= "lsof " + directory_path command= "lsof " + directory_path
@ -22,36 +22,89 @@ def is_directory_used_by_another_process(directory_path):
return False return False
return True return True
for host_backup_directory_name in os.listdir(args.backups_folder_path): def isSmallerThenMaximumBackupSize(maximum_backup_size_percent,backups_folder_path):
host_backup_directory_path = os.path.join(args.backups_folder_path, host_backup_directory_name) current_disc_usage_percent=psutil.disk_usage(backups_folder_path).percent
for application_directory in os.listdir(host_backup_directory_path): return current_disc_usage_percent > maximum_backup_size_percent
# The directory which contains all backup versions of the application def isDirectoryDeletable(version, versions, version_path):
versions_directory = os.path.join(host_backup_directory_path, application_directory) + "/" print("Checking directory %s ..." % (version_path))
if version == versions[-1]:
versions = os.listdir(versions_directory) print("Directory %s contains the last version of the backup. Skipped." % (version_path))
versions.sort(reverse=False) return False
print_used_disc_space() if is_directory_used_by_another_process(version_path):
for version in versions: print("Directory %s is used by another process. Skipped." % (version_path))
version_path=os.path.join(versions_directory, version) return False
print("Checking directory %s ..." % (version_path))
if version == versions[-1]: def deleteVersion(version_path, backups_folder_path):
print("Directory %s contains the last version of the backup. Skipped." % (version_path)) print("Deleting %s to free space." % (version_path))
continue current_disc_usage_percent=psutil.disk_usage(backups_folder_path).percent
shutil.rmtree(version_path)
new_disc_usage_percent=psutil.disk_usage(backups_folder_path).percent
difference_percent=current_disc_usage_percent-new_disc_usage_percent
print("{:6.2f} %% of drive freed".format(difference_percent))
def count_total_application_directories(backups_folder_path):
total_app_directories = 0
for host_backup_directory_name in os.listdir(backups_folder_path):
host_backup_directory_path = os.path.join(backups_folder_path, host_backup_directory_name)
total_app_directories += sum(os.path.isdir(os.path.join(host_backup_directory_path, d)) for d in os.listdir(host_backup_directory_path))
return total_app_directories
def count_total_version_folders(backups_folder_path):
total_version_folders = 0
for host_backup_directory_name in os.listdir(backups_folder_path):
host_backup_directory_path = os.path.join(backups_folder_path, host_backup_directory_name)
for application_directory in os.listdir(host_backup_directory_path):
versions_directory = os.path.join(host_backup_directory_path, application_directory)
total_version_folders += sum(os.path.isdir(os.path.join(versions_directory, d)) for d in os.listdir(versions_directory))
return total_version_folders
def average_version_directories_per_application(backups_folder_path,blur=-1):
total_app_directories = count_total_application_directories(backups_folder_path)
total_version_folders = count_total_version_folders(backups_folder_path)
if total_app_directories == 0:
return 0
average = total_version_folders / total_app_directories
return int(average) - blur
def getAmountOfIteration(versions,average_version_directories_per_application):
return len(versions) - average_version_directories_per_application
def deleteIteration(backups_folder_path,average_version_directories_per_application):
for host_backup_directory_name in os.listdir(backups_folder_path):
host_backup_directory_path = os.path.join(backups_folder_path, host_backup_directory_name)
for application_directory in os.listdir(host_backup_directory_path):
if is_directory_used_by_another_process(version_path): # The directory which contains all backup versions of the application
print("Directory %s is used by another process. Skipped." % (version_path)) versions_directory = os.path.join(host_backup_directory_path, application_directory) + "/"
continue
versions = os.listdir(versions_directory)
old_disc_usage_percent=psutil.disk_usage(args.backups_folder_path).percent versions.sort(reverse=False)
if old_disc_usage_percent > args.maximum_backup_size_percent: version_iteration=0
print("Deleting %s to free space." % (version_path)) while version_iteration < getAmountOfIteration(versions,average_version_directories_per_application):
shutil.rmtree(version_path) print_used_disc_space(backups_folder_path)
new_disc_usage_percent=psutil.disk_usage(args.backups_folder_path).percent version = versions[version_iteration]
difference_percent=old_disc_usage_percent-new_disc_usage_percent version_path=os.path.join(versions_directory, version)
print("{:6.2f} %% of drive freed".format(difference_percent)) if isDirectoryDeletable(version, versions, version_path):
continue deleteVersion(version_path, backups_folder_path)
version_iteration += 1
print_used_disc_space()
backups_folder_path=args.backups_folder_path
maximum_backup_size_percent=args.maximum_backup_size_percent
itteration_counter = 1
while isSmallerThenMaximumBackupSize(maximum_backup_size_percent, backups_folder_path):
if itteration_counter > 200:
raise Exception("Iteration limit exceeded")
print(f"Delete Iteration: {itteration_counter}")
average_version_directories = average_version_directories_per_application(backups_folder_path)
print(f"Average version directories per application directory: {average_version_directories}")
deleteIteration(backups_folder_path, average_version_directories)
itteration_counter += 1
print_used_disc_space(backups_folder_path)
print("Cleaning up finished.") print("Cleaning up finished.")

View File

@ -12,7 +12,7 @@ services:
- 127.0.0.1:{{http_port}}:80 - 127.0.0.1:{{http_port}}:80
volumes: volumes:
- data:/var/www/html - data:/var/www/html
restart: unless-stopped restart: {{docker_restart_policy}}
env_file: env_file:
- env/run.env - env/run.env
environment: environment:

View File

@ -9,7 +9,7 @@ services:
application: application:
image: baserow/baserow:1.19.1 image: baserow/baserow:1.19.1
container_name: baserow-application container_name: baserow-application
restart: always restart: {{docker_restart_policy}}
logging: logging:
driver: journald driver: journald
env_file: env_file:

View File

@ -1,7 +1,7 @@
ENABLE_COTURN=true ENABLE_COTURN=true
COTURN_TLS_CERT_PATH=/etc/letsencrypt/live/{{domain}}/fullchain.pem COTURN_TLS_CERT_PATH=/etc/letsencrypt/live/{{domain}}/fullchain.pem
COTURN_TLS_KEY_PATH=/etc/letsencrypt/live/{{domain}}/privkey.pem COTURN_TLS_KEY_PATH=/etc/letsencrypt/live/{{domain}}/privkey.pem
ENABLE_GREENLIGHT=true ENABLE_GREENLIGHT={{bigbluebutton_enable_greenlight}}
# Enable Webhooks # Enable Webhooks
# used by some integrations # used by some integrations

View File

@ -5,7 +5,7 @@ services:
{% include 'templates/docker-service-redis.yml.j2' %} {% include 'templates/docker-service-redis.yml.j2' %}
celeryworker: celeryworker:
restart: always restart: {{docker_restart_policy}}
image: funkwhale/api:${FUNKWHALE_VERSION:-latest} image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env env_file: .env
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0} command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
@ -18,7 +18,7 @@ services:
celerybeat: celerybeat:
restart: always restart: {{docker_restart_policy}}
image: funkwhale/api:${FUNKWHALE_VERSION:-latest} image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env env_file: .env
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
@ -26,7 +26,7 @@ services:
{% include 'templates/docker-container-networks.yml.j2' %} {% include 'templates/docker-container-networks.yml.j2' %}
api: api:
restart: always restart: {{docker_restart_policy}}
image: funkwhale/api:${FUNKWHALE_VERSION:-latest} image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
depends_on: depends_on:
env_file: .env env_file: .env
@ -39,7 +39,7 @@ services:
{% include 'templates/docker-container-networks.yml.j2' %} {% include 'templates/docker-container-networks.yml.j2' %}
front: front:
restart: always restart: {{docker_restart_policy}}
image: funkwhale/front:${FUNKWHALE_VERSION:-latest} image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
depends_on: depends_on:
- api - api

View File

@ -7,7 +7,7 @@ services:
application: application:
logging: logging:
driver: journald driver: journald
restart: always restart: {{docker_restart_policy}}
image: gitea/gitea:latest image: gitea/gitea:latest
environment: environment:
- USER_UID=1000 - USER_UID=1000

View File

@ -7,7 +7,7 @@ services:
web: web:
image: 'gitlab/gitlab-ee:latest' image: 'gitlab/gitlab-ee:latest'
restart: always restart: {{docker_restart_policy}}
hostname: '{{domain}}' hostname: '{{domain}}'
environment: environment:
GITLAB_OMNIBUS_CONFIG: | GITLAB_OMNIBUS_CONFIG: |

View File

@ -7,10 +7,9 @@
definition: definition:
application: application:
image: jenkins/jenkins:lts image: jenkins/jenkins:lts
restart: always restart: "{{docker_restart_policy}}"
ports: ports:
- "127.0.0.1:{{http_port}}:8080" - "127.0.0.1:{{http_port}}:8080"
restart: always
volumes: volumes:
- jenkins_data:/var/jenkins_home - jenkins_data:/var/jenkins_home
log_driver: journald log_driver: journald

View File

@ -13,7 +13,7 @@ services:
JOOMLA_DB_USER: "{{database_username}}" JOOMLA_DB_USER: "{{database_username}}"
JOOMLA_DB_PASSWORD: "{{database_password}}" JOOMLA_DB_PASSWORD: "{{database_password}}"
JOOMLA_DB_NAME: "{{database_name}}" JOOMLA_DB_NAME: "{{database_name}}"
restart: always restart: {{docker_restart_policy}}
volumes: volumes:
- data:/var/www/html - data:/var/www/html
ports: ports:

View File

@ -5,7 +5,7 @@ services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %} {% include 'templates/docker-service-' + database_type + '.yml.j2' %}
application: application:
restart: unless-stopped restart: {{docker_restart_policy}}
image: listmonk/listmonk:latest image: listmonk/listmonk:latest
ports: ports:
- "127.0.0.1:{{http_port}}:9000" - "127.0.0.1:{{http_port}}:9000"

View File

@ -10,7 +10,7 @@ services:
resolver: resolver:
image: ghcr.io/mailu/unbound:{{version_mailu}} image: ghcr.io/mailu/unbound:{{version_mailu}}
env_file: mailu.env env_file: mailu.env
restart: always restart: {{docker_restart_policy}}
{% include 'templates/docker-container-networks.yml.j2' %} {% include 'templates/docker-container-networks.yml.j2' %}
ipv4_address: 192.168.203.254 ipv4_address: 192.168.203.254
logging: logging:
@ -18,7 +18,7 @@ services:
front: front:
image: ghcr.io/mailu/nginx:{{version_mailu}} image: ghcr.io/mailu/nginx:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
logging: logging:
driver: journald driver: journald
@ -45,7 +45,7 @@ services:
admin: admin:
image: ghcr.io/mailu/admin:{{version_mailu}} image: ghcr.io/mailu/admin:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "admin_data:/data" - "admin_data:/data"
@ -63,7 +63,7 @@ services:
imap: imap:
image: ghcr.io/mailu/dovecot:{{version_mailu}} image: ghcr.io/mailu/dovecot:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "dovecot_mail:/mail" - "dovecot_mail:/mail"
@ -79,7 +79,7 @@ services:
smtp: smtp:
image: ghcr.io/mailu/postfix:{{version_mailu}} image: ghcr.io/mailu/postfix:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "/etc/mailu/overrides:/overrides:ro" - "/etc/mailu/overrides:/overrides:ro"
@ -96,7 +96,7 @@ services:
oletools: oletools:
image: ghcr.io/mailu/oletools:{{version_mailu}} image: ghcr.io/mailu/oletools:{{version_mailu}}
hostname: oletools hostname: oletools
restart: always restart: {{docker_restart_policy}}
depends_on: depends_on:
- resolver - resolver
dns: dns:
@ -106,7 +106,7 @@ services:
antispam: antispam:
image: ghcr.io/mailu/rspamd:{{version_mailu}} image: ghcr.io/mailu/rspamd:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "filter:/var/lib/rspamd" - "filter:/var/lib/rspamd"
@ -128,7 +128,7 @@ services:
# Optional services # Optional services
antivirus: antivirus:
image: ghcr.io/mailu/clamav:{{version_mailu}} image: ghcr.io/mailu/clamav:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "filter:/data" - "filter:/data"
@ -142,7 +142,7 @@ services:
webdav: webdav:
image: ghcr.io/mailu/radicale:{{version_mailu}} image: ghcr.io/mailu/radicale:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "webdav_data:/data" - "webdav_data:/data"
@ -159,7 +159,7 @@ services:
image: ghcr.io/mailu/fetchmail:{{version_mailu}} image: ghcr.io/mailu/fetchmail:{{version_mailu}}
volumes: volumes:
- "admin_data:/data" - "admin_data:/data"
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
logging: logging:
driver: journald driver: journald
@ -174,7 +174,7 @@ services:
webmail: webmail:
image: ghcr.io/mailu/webmail:{{version_mailu}} image: ghcr.io/mailu/webmail:{{version_mailu}}
restart: always restart: {{docker_restart_policy}}
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "webmail_data:/data" - "webmail_data:/data"

View File

@ -24,7 +24,7 @@
published_ports: published_ports:
- "127.0.0.1:3306:3306" # can be that this will be removed if all applications use sockets - "127.0.0.1:3306:3306" # can be that this will be removed if all applications use sockets
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
restart_policy: unless-stopped restart_policy: "{{docker_restart_policy}}"
healthcheck: healthcheck:
test: "/usr/bin/mariadb --user=root --password={{central_mariadb_root_password}} --execute \"SHOW DATABASES;\"" test: "/usr/bin/mariadb --user=root --password={{central_mariadb_root_password}} --execute \"SHOW DATABASES;\""
interval: 3s interval: 3s

View File

@ -7,7 +7,7 @@ services:
web: web:
image: ghcr.io/mastodon/mastodon:{{version_mastodon}} image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
restart: always restart: {{docker_restart_policy}}
env_file: .env.production env_file: .env.production
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
healthcheck: healthcheck:
@ -23,7 +23,7 @@ services:
streaming: streaming:
image: ghcr.io/mastodon/mastodon:{{version_mastodon}} image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
restart: always restart: {{docker_restart_policy}}
env_file: .env.production env_file: .env.production
command: node ./streaming command: node ./streaming
healthcheck: healthcheck:
@ -37,7 +37,7 @@ services:
sidekiq: sidekiq:
image: ghcr.io/mastodon/mastodon:{{version_mastodon}} image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
restart: always restart: {{docker_restart_policy}}
env_file: .env.production env_file: .env.production
command: bundle exec sidekiq command: bundle exec sidekiq
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %} {% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}

View File

@ -8,7 +8,7 @@ services:
logging: logging:
driver: journald driver: journald
image: matomo image: matomo
restart: always restart: {{docker_restart_policy}}
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
environment: environment:

View File

@ -6,7 +6,7 @@ services:
synapse: synapse:
image: matrixdotorg/synapse:latest image: matrixdotorg/synapse:latest
restart: always restart: {{docker_restart_policy}}
logging: logging:
driver: journald driver: journald
volumes: volumes:
@ -23,7 +23,7 @@ services:
element: element:
image: vectorim/element-web:latest image: vectorim/element-web:latest
restart: unless-stopped restart: {{docker_restart_policy}}
volumes: volumes:
- ./element-config.json:/app/config.json - ./element-config.json:/app/config.json
ports: ports:
@ -34,28 +34,28 @@ services:
#mautrix-telegram: #mautrix-telegram:
# container_name: mautrix-telegram # container_name: mautrix-telegram
# image: dock.mau.dev/mautrix/telegram:<version> # image: dock.mau.dev/mautrix/telegram:<version>
# restart: unless-stopped # restart: {{docker_restart_policy}}
# volumes: # volumes:
# - telegram_bridge_data:/data # - telegram_bridge_data:/data
#mautrix-whatsapp: #mautrix-whatsapp:
# container_name: mautrix-whatsapp # container_name: mautrix-whatsapp
# image: dock.mau.dev/mautrix/whatsapp:latest # image: dock.mau.dev/mautrix/whatsapp:latest
# restart: unless-stopped # restart: {{docker_restart_policy}}
# volumes: # volumes:
# - ./mautrix_whatsapp:/data # - ./mautrix_whatsapp:/data
#mautrix-facebook: #mautrix-facebook:
# container_name: mautrix-facebook # container_name: mautrix-facebook
# image: dock.mau.dev/mautrix/facebook:<version> # image: dock.mau.dev/mautrix/facebook:<version>
# restart: unless-stopped # restart: {{docker_restart_policy}}
# volumes: # volumes:
# - facebook_bridge_data:/data # - facebook_bridge_data:/data
#mautrix-instagram: #mautrix-instagram:
# container_name: mautrix-instagram # container_name: mautrix-instagram
# image: dock.mau.dev/mautrix/instagram:<version> # image: dock.mau.dev/mautrix/instagram:<version>
# restart: unless-stopped # restart: {{docker_restart_policy}}
# volumes: # volumes:
# - instagram_bridge_data:/data # - instagram_bridge_data:/data

View File

@ -8,7 +8,7 @@
application: application:
log_driver: journald log_driver: journald
image: mediawiki image: mediawiki
restart: always restart: "{{docker_restart_policy}}"
depends_on: depends_on:
- database - database
volumes: volumes:
@ -26,4 +26,4 @@
MARIADB_AUTO_UPGRADE: "1" MARIADB_AUTO_UPGRADE: "1"
volumes: volumes:
- database:/var/lib/mysql - database:/var/lib/mysql
restart: always restart: "{{docker_restart_policy}}"

View File

@ -9,7 +9,7 @@ services:
options: options:
tag: "mybb_application" tag: "mybb_application"
image: mybb/mybb:latest image: mybb/mybb:latest
restart: always restart: {{docker_restart_policy}}
volumes: volumes:
- data:/var/www/html - data:/var/www/html
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %} {% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
@ -21,7 +21,7 @@ services:
options: options:
tag: "mybb_server" tag: "mybb_server"
image: nginx:mainline image: nginx:mainline
restart: always restart: {{docker_restart_policy}}
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
volumes: volumes:

View File

@ -8,7 +8,7 @@ services:
application: application:
image: "nextcloud:{{version_nextcloud}}-fpm-alpine" image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
restart: always restart: {{docker_restart_policy}}
logging: logging:
driver: journald driver: journald
volumes: volumes:
@ -25,7 +25,7 @@ services:
image: nginx:alpine image: nginx:alpine
logging: logging:
driver: journald driver: journald
restart: always restart: {{docker_restart_policy}}
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
volumes: volumes:
@ -41,7 +41,7 @@ services:
cron: cron:
image: "nextcloud:{{version_nextcloud}}-fpm-alpine" image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
restart: always restart: {{docker_restart_policy}}
logging: logging:
driver: journald driver: journald
volumes: volumes:

View File

@ -1,7 +1,7 @@
version: "3.7" version: "3.7"
x-op-app: &app x-op-app: &app
restart: unless-stopped restart: {{docker_restart_policy}}
image: openproject/community:${TAG:-13} image: openproject/community:${TAG:-13}
environment: environment:
OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS}" OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS}"
@ -25,11 +25,11 @@ services:
cache: cache:
image: memcached image: memcached
restart: unless-stopped restart: {{docker_restart_policy}}
{% include 'templates/docker-container-networks.yml.j2' %} {% include 'templates/docker-container-networks.yml.j2' %}
proxy: proxy:
restart: unless-stopped restart: {{docker_restart_policy}}
image: openproject/community:${TAG:-13} image: openproject/community:${TAG:-13}
command: "./docker/prod/proxy" command: "./docker/prod/proxy"
ports: ports:

View File

@ -8,7 +8,7 @@ services:
application: application:
image: zknt/pixelfed image: zknt/pixelfed
restart: always restart: {{docker_restart_policy}}
logging: logging:
driver: journald driver: journald
env_file: env_file:
@ -23,7 +23,7 @@ services:
{% include 'templates/docker-container-networks.yml.j2' %} {% include 'templates/docker-container-networks.yml.j2' %}
worker: worker:
image: zknt/pixelfed image: zknt/pixelfed
restart: always restart: {{docker_restart_policy}}
logging: logging:
driver: journald driver: journald
env_file: env_file:

View File

@ -18,7 +18,7 @@
- "127.0.0.1:5432:5432" - "127.0.0.1:5432:5432"
volumes: volumes:
- central_postgres_database:/var/lib/postgresql/data - central_postgres_database:/var/lib/postgresql/data
restart_policy: unless-stopped restart_policy: "{{docker_restart_policy}}"
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s interval: 10s

View File

@ -6,4 +6,4 @@ services:
context: . context: .
ports: ports:
- 127.0.0.1:{{http_port}}:8080 - 127.0.0.1:{{http_port}}:8080
restart: always restart: {{docker_restart_policy}}

View File

@ -10,7 +10,7 @@ services:
image: custom_wordpress image: custom_wordpress
build: build:
context: . context: .
restart: always restart: {{docker_restart_policy}}
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
environment: environment:

View File

@ -8,7 +8,7 @@ services:
logging: logging:
driver: journald driver: journald
image: yourls image: yourls
restart: always restart: {{docker_restart_policy}}
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
environment: environment:

View File

@ -6,6 +6,7 @@
template: template:
src: "msmtprc.conf.j2" src: "msmtprc.conf.j2"
dest: "/root/.msmtprc" dest: "/root/.msmtprc"
mode: 600
when: run_once_systemd_notifier_email is not defined when: run_once_systemd_notifier_email is not defined
- name: "create {{systemd_notifier_email_folder}}" - name: "create {{systemd_notifier_email_folder}}"

View File

@ -7,5 +7,9 @@ Subject: $1
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
$(systemctl status --full "$1") A problem with the service $1 occured:
$(systemctl status --full "$1" | head -n 30)
ERRMAIL ERRMAIL

View File

@ -5,7 +5,7 @@
logging: logging:
driver: journald driver: journald
image: mariadb image: mariadb
restart: always restart: {{docker_restart_policy}}
environment: environment:
MYSQL_DATABASE: "{{database_name}}" MYSQL_DATABASE: "{{database_name}}"
MYSQL_USER: "{{database_username}}" MYSQL_USER: "{{database_username}}"

View File

@ -8,7 +8,7 @@
- POSTGRES_USER={{database_username}} - POSTGRES_USER={{database_username}}
- POSTGRES_DB={{database_name}} - POSTGRES_DB={{database_name}}
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C - POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
restart: always restart: {{docker_restart_policy}}
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U {{database_name}}"] test: ["CMD-SHELL", "pg_isready -U {{database_name}}"]
interval: 10s interval: 10s

View File

@ -2,7 +2,7 @@
redis: redis:
image: redis:alpine image: redis:alpine
container_name: {{docker_compose_project_name}}-redis container_name: {{docker_compose_project_name}}-redis
restart: always restart: {{docker_restart_policy}}
logging: logging:
driver: journald driver: journald
volumes: volumes: