Add missing files to Nextcloud config + some tweaks

This commit is contained in:
Paul-Henri Froidmont 2018-01-12 01:37:27 +01:00
parent 5226d54eb3
commit 3c4d76c76e
9 changed files with 84 additions and 57 deletions

View file

@ -16,7 +16,7 @@
- role: emby-docker
- role: gitlab-docker
- role: mailu-docker
- role: nextcloud-docker
- { role: nextcloud-docker, tags: [ 'nextcloud', 'docker' ] }
- role: matrix-docker
- role: plex-docker
- role: deluge-docker

View file

@ -1,4 +1,14 @@
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"]

View 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

View 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>

View file

@ -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,
),
),
);

View file

@ -1,5 +1,6 @@
<?php
$CONFIG = array (
'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => 'redis',

View file

@ -17,7 +17,7 @@ services:
- VIRTUAL_PORT=80
depends_on:
- app
- collabora
# - collabora
networks:
- proxy-tier
- default
@ -26,8 +26,8 @@ services:
app:
build: ./app
volumes:
- ./config/config.php:/var/www/html/config/config.php
- /var/lib/nextcloud:/var/www/html
- ./config:/var/www/html/config
- /media:/media
- /etc/localtime:/etc/localtime:ro
environment:
@ -39,27 +39,6 @@ services:
- redis
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:
image: mariadb
volumes:
@ -79,21 +58,21 @@ services:
image: redis
restart: always
collabora:
image: collabora/code
cap_add:
- MKNOD
expose:
- 9980
environment:
- domain=${CLOUD_DOMAIN}
- VIRTUAL_HOST=${COLLABORA_DOMAIN}
- VIRTUAL_NETWORK=nginx-proxy
- VIRTUAL_PORT=9980
# collabora:
# image: collabora/code
# cap_add:
# - MKNOD
# expose:
# - 9980
# environment:
# - domain=${CLOUD_DOMAIN}
# - VIRTUAL_HOST=${COLLABORA_DOMAIN}
# - VIRTUAL_NETWORK=nginx-proxy
# - VIRTUAL_PORT=9980
# - VIRTUAL_PROTO=https
# - LETSENCRYPT_HOST=${COLLABORA_DOMAIN}
# - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
networks:
- proxy-tier
- default
restart: always
# networks:
# - proxy-tier
# - default
# restart: always

View file

@ -104,7 +104,7 @@ http {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
# fastcgi_param HTTPS on;
fastcgi_param HTTPS on;
#Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;

View file

@ -19,23 +19,7 @@ $CONFIG = array (
'dbuser' => 'nextcloud',
'dbpassword' => '{{nextcloud_mysql_password}}',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'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,
'updater.release.channel' => 'stable',
'loglevel' => '1',