mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Add missing files to Nextcloud config + some tweaks
This commit is contained in:
parent
5226d54eb3
commit
3c4d76c76e
9 changed files with 84 additions and 57 deletions
|
|
@ -16,7 +16,7 @@
|
||||||
- role: emby-docker
|
- role: emby-docker
|
||||||
- role: gitlab-docker
|
- role: gitlab-docker
|
||||||
- role: mailu-docker
|
- role: mailu-docker
|
||||||
- role: nextcloud-docker
|
- { role: nextcloud-docker, tags: [ 'nextcloud', 'docker' ] }
|
||||||
- role: matrix-docker
|
- role: matrix-docker
|
||||||
- role: plex-docker
|
- role: plex-docker
|
||||||
- role: deluge-docker
|
- role: deluge-docker
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,14 @@
|
||||||
FROM nextcloud:fpm
|
FROM nextcloud:fpm
|
||||||
|
|
||||||
COPY redis.config.php /usr/src/nextcloud/config/redis.config.php
|
RUN apt-get update && apt-get install -y \
|
||||||
|
supervisor \
|
||||||
|
cron \
|
||||||
|
vim \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN mkdir /var/log/supervisord /var/run/supervisord && \
|
||||||
|
echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
CMD ["/usr/bin/supervisord"]
|
||||||
|
|
|
||||||
23
roles/nextcloud-docker/files/nextcloud/app/supervisord.conf
Normal file
23
roles/nextcloud-docker/files/nextcloud/app/supervisord.conf
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
logfile=/var/log/supervisord/supervisord.log
|
||||||
|
pidfile=/var/run/supervisord/supervisord.pid
|
||||||
|
childlogdir=/var/log/supervisord/
|
||||||
|
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||||
|
logfile_backups=10 ; number of backed up logfiles
|
||||||
|
loglevel=debug
|
||||||
|
|
||||||
|
[program:php-fpm]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=php-fpm
|
||||||
|
|
||||||
|
[program:cron]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=cron -f
|
||||||
|
|
||||||
15
roles/nextcloud-docker/files/nextcloud/config/.htaccess
Normal file
15
roles/nextcloud-docker/files/nextcloud/config/.htaccess
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# line below if for Apache 2.4
|
||||||
|
<ifModule mod_authz_core.c>
|
||||||
|
Require all denied
|
||||||
|
</ifModule>
|
||||||
|
|
||||||
|
# line below if for Apache 2.2
|
||||||
|
<ifModule !mod_authz_core.c>
|
||||||
|
deny from all
|
||||||
|
</ifModule>
|
||||||
|
|
||||||
|
# section for Apache 2.2 and 2.4
|
||||||
|
<ifModule mod_autoindex.c>
|
||||||
|
IndexIgnore *
|
||||||
|
</ifModule>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
$CONFIG = array (
|
||||||
|
"apps_paths" => array (
|
||||||
|
0 => array (
|
||||||
|
"path" => OC::$SERVERROOT."/apps",
|
||||||
|
"url" => "/apps",
|
||||||
|
"writable" => false,
|
||||||
|
),
|
||||||
|
1 => array (
|
||||||
|
"path" => OC::$SERVERROOT."/custom_apps",
|
||||||
|
"url" => "/custom_apps",
|
||||||
|
"writable" => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$CONFIG = array (
|
$CONFIG = array (
|
||||||
|
'memcache.local' => '\OC\Memcache\Redis',
|
||||||
'memcache.locking' => '\OC\Memcache\Redis',
|
'memcache.locking' => '\OC\Memcache\Redis',
|
||||||
'redis' => array(
|
'redis' => array(
|
||||||
'host' => 'redis',
|
'host' => 'redis',
|
||||||
|
|
@ -17,7 +17,7 @@ services:
|
||||||
- VIRTUAL_PORT=80
|
- VIRTUAL_PORT=80
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
- collabora
|
# - collabora
|
||||||
networks:
|
networks:
|
||||||
- proxy-tier
|
- proxy-tier
|
||||||
- default
|
- default
|
||||||
|
|
@ -26,8 +26,8 @@ services:
|
||||||
app:
|
app:
|
||||||
build: ./app
|
build: ./app
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/config.php:/var/www/html/config/config.php
|
|
||||||
- /var/lib/nextcloud:/var/www/html
|
- /var/lib/nextcloud:/var/www/html
|
||||||
|
- ./config:/var/www/html/config
|
||||||
- /media:/media
|
- /media:/media
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -39,27 +39,6 @@ services:
|
||||||
- redis
|
- redis
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
cron:
|
|
||||||
build: ./app
|
|
||||||
restart: always
|
|
||||||
volumes:
|
|
||||||
- /var/lib/nextcloud:/var/www/html
|
|
||||||
user: www-data
|
|
||||||
entrypoint: |
|
|
||||||
bash -c 'bash -s <<EOF
|
|
||||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
|
||||||
while [ ! -f /var/www/html/config/config.php ]; do
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
while true; do
|
|
||||||
php -f /var/www/html/cron.php
|
|
||||||
sleep 15m
|
|
||||||
done
|
|
||||||
EOF'
|
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
- redis
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -79,21 +58,21 @@ services:
|
||||||
image: redis
|
image: redis
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
collabora:
|
# collabora:
|
||||||
image: collabora/code
|
# image: collabora/code
|
||||||
cap_add:
|
# cap_add:
|
||||||
- MKNOD
|
# - MKNOD
|
||||||
expose:
|
# expose:
|
||||||
- 9980
|
# - 9980
|
||||||
environment:
|
# environment:
|
||||||
- domain=${CLOUD_DOMAIN}
|
# - domain=${CLOUD_DOMAIN}
|
||||||
- VIRTUAL_HOST=${COLLABORA_DOMAIN}
|
# - VIRTUAL_HOST=${COLLABORA_DOMAIN}
|
||||||
- VIRTUAL_NETWORK=nginx-proxy
|
# - VIRTUAL_NETWORK=nginx-proxy
|
||||||
- VIRTUAL_PORT=9980
|
# - VIRTUAL_PORT=9980
|
||||||
# - VIRTUAL_PROTO=https
|
# - VIRTUAL_PROTO=https
|
||||||
# - LETSENCRYPT_HOST=${COLLABORA_DOMAIN}
|
# - LETSENCRYPT_HOST=${COLLABORA_DOMAIN}
|
||||||
# - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
# - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
||||||
networks:
|
# networks:
|
||||||
- proxy-tier
|
# - proxy-tier
|
||||||
- default
|
# - default
|
||||||
restart: always
|
# restart: always
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ http {
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
# fastcgi_param HTTPS on;
|
fastcgi_param HTTPS on;
|
||||||
#Avoid sending the security headers twice
|
#Avoid sending the security headers twice
|
||||||
fastcgi_param modHeadersAvailable true;
|
fastcgi_param modHeadersAvailable true;
|
||||||
fastcgi_param front_controller_active true;
|
fastcgi_param front_controller_active true;
|
||||||
|
|
|
||||||
|
|
@ -19,23 +19,7 @@ $CONFIG = array (
|
||||||
'dbuser' => 'nextcloud',
|
'dbuser' => 'nextcloud',
|
||||||
'dbpassword' => '{{nextcloud_mysql_password}}',
|
'dbpassword' => '{{nextcloud_mysql_password}}',
|
||||||
'installed' => true,
|
'installed' => true,
|
||||||
'memcache.local' => '\\OC\\Memcache\\APCu',
|
|
||||||
'htaccess.RewriteBase' => '/',
|
'htaccess.RewriteBase' => '/',
|
||||||
'apps_paths' =>
|
|
||||||
array (
|
|
||||||
0 =>
|
|
||||||
array (
|
|
||||||
'path' => '/var/www/html/apps',
|
|
||||||
'url' => '/apps',
|
|
||||||
'writable' => false,
|
|
||||||
),
|
|
||||||
1 =>
|
|
||||||
array (
|
|
||||||
'path' => '/var/www/html/custom_apps',
|
|
||||||
'url' => '/custom_apps',
|
|
||||||
'writable' => true,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'maintenance' => false,
|
'maintenance' => false,
|
||||||
'updater.release.channel' => 'stable',
|
'updater.release.channel' => 'stable',
|
||||||
'loglevel' => '1',
|
'loglevel' => '1',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue