mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized docker nextcloud for backup
This commit is contained in:
66
roles/docker-nextcloud/templates/docker-compose.yml.j2
Normal file
66
roles/docker-nextcloud/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,66 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
application:
|
||||
image: "nextcloud:{{nextcloud_version}}-fpm-alpine"
|
||||
restart: always
|
||||
logging:
|
||||
driver: journald
|
||||
depends_on:
|
||||
- database
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 120
|
||||
DOCKER_CLIENT_TIMEOUT: 120
|
||||
MYSQL_DATABASE: "nextcloud"
|
||||
MYSQL_USER: "nextcloud"
|
||||
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
|
||||
MYSQL_HOST: database:3306
|
||||
database:
|
||||
logging:
|
||||
driver: journald
|
||||
image: mariadb
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 120
|
||||
DOCKER_CLIENT_TIMEOUT: 120
|
||||
MYSQL_DATABASE: "nextcloud"
|
||||
MYSQL_USER: "nextcloud"
|
||||
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
restart: always
|
||||
web:
|
||||
image: nginx:alpine
|
||||
logging:
|
||||
driver: journald
|
||||
restart: always
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port}}:80"
|
||||
depends_on:
|
||||
- application
|
||||
volumes:
|
||||
- /usr/local/bin/docker-nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
volumes_from:
|
||||
- application
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
cron:
|
||||
image: "nextcloud:{{nextcloud_version}}-fpm-alpine"
|
||||
restart: always
|
||||
logging:
|
||||
driver: journald
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
entrypoint: /cron.sh
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
volumes:
|
||||
database:
|
||||
data:
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
Reference in New Issue
Block a user