first commit

This commit is contained in:
julien 2025-01-14 17:40:53 +01:00
commit fb0f9c8f4f
4 changed files with 116 additions and 0 deletions

37
.env Normal file
View File

@ -0,0 +1,37 @@
# MariaDB
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
#MYSQL_PASSWORD=
MYSQL_HOST=cloudnetignet_mariadb
#MYSQL_ROOT_PASSWORD=
# Admin account
NEXTCLOUD_ADMIN_USER=admin
#NEXTCLOUD_ADMIN_PASSWORD=
# Trusted domains
NEXTCLOUD_TRUSTED_DOMAINS=127.0.0.1 cloud.netig.net collabora.netig.net
# Redis
REDIS_HOST=cloudnetignet_redis
# SMTP
SMTP_HOST=mail.netig.net
SMTP_SECURE=tls
SMTP_PORT=587
SMTP_AUTHTYPE=LOGIN
SMTP_NAME=noreply@netig.net
#SMTP_PASSWORD=
MAIL_FROM_ADDRESS=noreply
MAIL_DOMAIN=netig.net
# Upload size
PHP_MEMORY_LIMIT=1024M
PHP_UPLOAD_LIMIT=1024M
APACHE_BODY_LIMIT=0
# Reverse Proxy
OVERWRITEHOST=cloud.netig.net
OVERWRITEPROTOCOL=https
OVERWRITECLIURL=https://cloud.netig.net
TRUSTED_PROXIES=127.0.0.1 103.177.249.4 2a13:7c81:157::2

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
volumes/

42
README.md Normal file
View File

@ -0,0 +1,42 @@
# cloud.netig.net
## Cron
Add this line into the host crontab with `crontab -e`.
```
*/5 * * * * nerdctl exec -u www-data cloudnetignet_nextcloud php /var/www/html/cron.php
```
## Config
```
# nerdctl exec --user www-data cloudnetignet_nextcloud php occ background:cron
# nerdctl exec --user www-data cloudnetignet_nextcloud php occ config:system:set maintenance_window_start --value="4" --type=integer
# nerdctl exec --user www-data cloudnetignet_nextcloud php occ config:system:set default_phone_region --value="fr"
```
## Maintenance
```
# nerdctl exec --user www-data cloudnetignet_nextcloud php occ maintenance:repair --include-expensive
# nerdctl exec --user www-data cloudnetignet_nextcloud php occ db:add-missing-indices
```
## Privacy
Disable the contact menu.
```
# nerdctl exec --user www-data -ti cloudnetignet_nextcloud sed -i '/<div id="contactsmenu"><\/div>/d' core/templates/layout.user.php
```
Disable the unified search menu.
```
# nerdctl exec --user www-data -ti cloudnetignet_nextcloud sed -i '/<div id="unified-search"><\/div>/d' core/templates/layout.user.php
```
## Tips
To Clear logs.
```
# rm /srv/dwalin/cloud.netig.net/volumes/nextcloud/data/nextcloud.log*
```

36
compose.yml Normal file
View File

@ -0,0 +1,36 @@
services:
redis:
image: redis:latest
container_name: cloudnetignet_redis
volumes:
- ./volumes/redis:/data
command: redis-server --appendonly yes
restart: unless-stopped
mariadb:
image: mariadb:11.4
container_name: cloudnetignet_mariadb
env_file:
- .env
- ../passwords/cloudnetignet.pass
volumes:
- ./volumes/mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
nextcloud:
image: nextcloud:latest
container_name: cloudnetignet_nextcloud
depends_on:
- mariadb
env_file:
- .env
- ../passwords/cloudnetignet.pass
ports:
- "127.0.0.1:9002:80"
volumes:
- ./volumes/nextcloud:/var/www/html
restart: unless-stopped