Move Nextloud DB to host

This commit is contained in:
Andreas Zweili 2022-06-01 21:12:48 +02:00
parent 1f7ed88dfd
commit 58898be767
2 changed files with 13 additions and 39 deletions

View File

@ -1,18 +1,3 @@
MYSQL_PASSWORD={{ nextcloud_mysql_password }} MYSQL_PASSWORD={{ nextcloud_mysql_password }}
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
APP_DOMAIN=nextcloud.2li.ch
NEXTCLOUD_ADMIN_USER=thedoctor
NEXTCLOUD_ADMIN_PASSWORD={{ nextcloud_admin_password }} NEXTCLOUD_ADMIN_PASSWORD={{ nextcloud_admin_password }}
NEXTCLOUD_TRUSTED_DOMAINS=nextcloud2.2li.local 10.7.89.103
SMTP_HOST=mail.infomaniak.com
SMTP_PORT=587
SMTP_SECURE=ssl
SMTP_NAME=admin@2li.ch
SMTP_PASSWORD={{ nextcloud_smtp_password }} SMTP_PASSWORD={{ nextcloud_smtp_password }}
MAIL_FROM_ADDRESS=admin@2li.ch
PHOTOPRISM_ADMIN_PASSWORD=password
PHOTOPRISM_DATABASE_PASSWORD=password

View File

@ -1,18 +1,6 @@
version: "2" version: "2"
services: services:
db:
image: mariadb:10.5-focal
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: unless-stopped
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_PASSWORD
- MYSQL_DATABASE
- MYSQL_USER
redis: redis:
image: redis:alpine image: redis:alpine
restart: unless-stopped restart: unless-stopped
@ -21,27 +9,28 @@ services:
build: ./nextcloud build: ./nextcloud
environment: environment:
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_DATABASE - "MYSQL_DATABASE=nextcloud"
- MYSQL_USER - "MYSQL_USER=nextcloud"
- MYSQL_HOST=db - "MYSQL_HOST=host.docker.internal"
- NEXTCLOUD_ADMIN_USER - "NEXTCLOUD_ADMIN_USER=thedoctor"
- NEXTCLOUD_ADMIN_PASSWORD - NEXTCLOUD_ADMIN_PASSWORD
- "NEXTCLOUD_TRUSTED_DOMAINS=${APP_DOMAIN} ${NEXTCLOUD_TRUSTED_DOMAINS}" - "NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.2li.ch nextcloud2.2li.local 10.7.89.103"
- REDIS_HOST=redis - "REDIS_HOST=redis"
- SMTP_HOST - "SMTP_HOST=mail.infomaniak.com"
- SMTP_SECURE - "SMTP_SECURE=ssl"
- SMTP_PORT - "SMTP_PORT=587"
- SMTP_NAME - "SMTP_NAME=admin@2li.ch"
- SMTP_PASSWORD - SMTP_PASSWORD
- MAIL_FORM_ADDRESS - "MAIL_FROM_ADDRESS=admin@2li.ch"
depends_on: depends_on:
- db
- redis - redis
volumes: volumes:
- nextcloud_data:/var/www/html - nextcloud_data:/var/www/html
- ./custom-php.ini:/usr/local/etc/php/conf.d/zzz-custom.ini - ./custom-php.ini:/usr/local/etc/php/conf.d/zzz-custom.ini
ports: ports:
- 8080:80 - 8080:80
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped restart: unless-stopped
cron: cron: