Reverted back to using local files for nextcloud and added health check
This commit is contained in:
parent
0eb4463bc1
commit
f70ca9ed2b
4 changed files with 43 additions and 18 deletions
3
thinkcentre/nextcloud/NOTES.md
Normal file
3
thinkcentre/nextcloud/NOTES.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Remember to move the cronjob if moving between servers:
|
||||
|
||||
*/5 * * * * /usr/bin/docker container exec -u www-data nextcloud php -f cron.php --define apc.enable_cli=1
|
|
@ -9,33 +9,29 @@ services:
|
|||
- 8080:80
|
||||
volumes:
|
||||
- app:/var/www/html
|
||||
- files:/var/www/html/data
|
||||
- config:/var/www/html/config
|
||||
- /mnt/data/nextcloud/files:/var/www/html/data
|
||||
- /mnt/data/nextcloud/config:/var/www/html/config
|
||||
- /mnt/data/nextcloud/config/nextcloud.log:/var/www/html/data/nextcloud.log
|
||||
environment:
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||
- MYSQL_USER=${MYSQL_USER}
|
||||
- MYSQL_HOST=${MYSQL_HOST}
|
||||
#networks:
|
||||
healthcheck:
|
||||
test: ["CMD", "../lan-healthcheck.sh"]
|
||||
interval: 20s
|
||||
retries: 5
|
||||
timeout: 10s
|
||||
networks:
|
||||
# - mariadb_default
|
||||
# - proxy
|
||||
- proxy
|
||||
|
||||
#networks:
|
||||
networks:
|
||||
#mariadb_default:
|
||||
# external: true
|
||||
#proxy:
|
||||
# name: proxy
|
||||
# external: true
|
||||
proxy:
|
||||
name: proxy
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
app:
|
||||
files:
|
||||
driver_opts:
|
||||
type: "nfs"
|
||||
o: "addr=192.168.1.100,nfsvers=4"
|
||||
device: ":/mnt/data/nextcloud/files"
|
||||
config:
|
||||
driver_opts:
|
||||
type: "nfs"
|
||||
o: "addr=192.168.1.100,nfsvers=4"
|
||||
device: ":/mnt/data/nextcloud/config"
|
||||
|
|
14
thinkcentre/nextcloud/lan-healthcheck.sh
Executable file
14
thinkcentre/nextcloud/lan-healthcheck.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
source .env
|
||||
|
||||
CONTAINER_NAME="mariadb-main"
|
||||
|
||||
# Check if the Docker container is running on the remote host
|
||||
if ssh "$USER@$MYSQL_HOST" "docker ps -q -f name=$CONTAINER_NAME" >/dev/null 2>&1; then
|
||||
echo "Docker container $CONTAINER_NAME is running on $MYSQL_HOST"
|
||||
exit 0
|
||||
else
|
||||
echo "Docker container $CONTAINER_NAME is not running on $MYSQL_HOST"
|
||||
exit 1
|
||||
fi
|
12
thinkcentre/redis/docker-compose.yml
Normal file
12
thinkcentre/redis/docker-compose.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: '3.3'
|
||||
services:
|
||||
redis:
|
||||
container_name: redis
|
||||
image: redis:latest
|
||||
restart: always
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
Loading…
Reference in a new issue