This commit is contained in:
martin.fencl
2026-08-17 15:44:05 +02:00
parent 7cca8da60b
commit e0472265e7
2 changed files with 89 additions and 3 deletions
@@ -0,0 +1,74 @@
services:
nextcloud:
image: "nextcloud:{{ nextcloud_version }}-apache"
container_name: nextcloud
restart: unless-stopped
networks:
- cloud
depends_on:
- nextclouddb
- redis
ports:
- 8080:80
volumes:
- /data/compose/nextcloud/config:/var/www/html/config
- /data/compose/nextcloud/data:/var/www/html/data
- /data/compose/nextcloud/custom_apps:/var/www/html/custom_apps
environment:
- TZ=Europe/Prague
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=dbpassword
- MYSQL_HOST=nextclouddb
- REDIS_HOST=redis
- NEXTCLOUD_ADMIN_USER=root
- NEXTCLOUD_ADMIN_PASSWORD=1234SilneHeslo.-.
- PHP_MEMORY_LIMIT=2048M
nextclouddb:
image: mariadb
container_name: nextcloud-db
restart: unless-stopped
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
networks:
- cloud
volumes:
- /data/compose/nextcloud/nextclouddb:/var/lib/mysql
environment:
- TZ=Europe/Prague
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=dbpassword
- MARIADB_AUTO_UPGRADE=1
redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
networks:
- cloud
volumes:
- /data/compose/nextcloud/redis:/data
#collabora:
# image: collabora/code
# container_name: collabora
# restart: unless-stopped
# networks:
# - cloud
# environment:
# - TZ=Europe/Prague
# - password=password
# - username=nextcloud
# - domain=cloud.martinfencl.eu
# - extra_params=--o:ssl.enable=false --o:ssl.termination=true
# - aliasgroup1=https://cloud.martinfencl.eu:443,https://collabora.martinfencl.eu:443
# - dictionaries=de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru cs_CZ
# ports:
# - 9980:9980
networks:
cloud:
driver: bridge
+15 -3
View File
@@ -15,6 +15,8 @@
vm_use_sudo: "{{ use_sudo | default(false) | bool }}"
debug_level: "{{ DEBUG | default(0) | int }}"
retry_count: "{{ RETRIES | default(25) | int }}"
nextcloud_version: >-
{{ NEXTCLOUD_VERSION | default('') | string | trim }}
# Docker Compose configuration.
nextcloud_project: "nextcloud-collabora"
@@ -22,7 +24,7 @@
# Compose file stored in Git.
nextcloud_compose_local_file: >-
{{ playbook_dir }}/../docker-compose/docker-compose-nextcloud.yml
{{ playbook_dir }}/../docker-compose/docker-compose-nextcloud.yml.j2
# Compose file location on the Nextcloud VM.
nextcloud_compose_file: >-
@@ -763,6 +765,16 @@
echo "Post-upgrade checks completed successfully"
pre_tasks:
- name: Validate requested Nextcloud version
ansible.builtin.assert:
that:
- nextcloud_version | length > 0
- 'nextcloud_version is match("^[0-9]+[.][0-9]+[.][0-9]+$")'
fail_msg: >-
NEXTCLOUD_VERSION is required and must have format X.Y.Z,
for example 34.0.3.
quiet: true
- name: Validate VM connection variables
ansible.builtin.assert:
that:
@@ -822,8 +834,8 @@
- name: Nextcloud | Synchronize Compose file to VM
block:
- name: Nextcloud | Stage Compose file on Proxmox host
ansible.builtin.copy:
- name: Nextcloud | Render Compose file on Proxmox host
ansible.builtin.template:
src: "{{ nextcloud_compose_local_file }}"
dest: "{{ nextcloud_compose_controller_staging_file }}"
mode: "0600"