Cambios para el documento Instalacion (docker)

Última modificación por dFa el 2025/02/24 10:01

Desde la versión 4.2
editado por dFa
el 2025/02/22 09:31
Cambiar el comentario: No hay comentario para esta versión
Hasta la versión 6.1
editado por dFa
el 2025/02/22 09:40
Cambiar el comentario: No hay comentario para esta versión

Resumen

Detalles

Propiedades de página
Contenido
... ... @@ -113,10 +113,207 @@
113 113  
114 114  Desplegamos los contenedores:
115 115  
116 -[[image:1740216587698-323.png]]
116 +[[image:1740216653242-590.png]]
117 117  
118 +Y vemos que se han creado los volumenes correctamente:
118 118  
120 +[[image:1740216641833-376.png]]
119 119  
122 +== Configuración ==
123 +
124 +Con los volumenes creados, todavía nextcloud no es accesible, dado que debemos configurar tanto el config.php como como el nginx.conf.
125 +
126 +El fichero nginx.conf se encuentra en el volumen nextcloud_nginx_conf. Realizamos previamente un backup y reemplazamos por el siguiente:
127 +
128 +{{code language="yaml"}}
129 +worker_processes auto;
130 +
131 +error_log /var/log/nginx/error.log warn;
132 +pid /var/run/nginx.pid;
133 +
134 +events {
135 + worker_connections 1024;
136 +}
137 +
138 +http {
139 + include mime.types;
140 + default_type application/octet-stream;
141 + types {
142 + text/javascript mjs;
143 + application/wasm wasm;
144 + }
145 +
146 + log_format main '$remote_addr - $remote_user [$time_local] "$request" '
147 + '$status $body_bytes_sent "$http_referer" '
148 + '"$http_user_agent" "$http_x_forwarded_for"';
149 +
150 + access_log /var/log/nginx/access.log main;
151 +
152 + sendfile on;
153 + keepalive_timeout 65;
154 +
155 + # Define asset_immutable variable properly
156 + map $arg_v $asset_immutable {
157 + default "";
158 + "" ", immutable";
159 + }
160 +
161 + upstream php-handler {
162 + server app:9000;
163 + }
164 +
165 + server {
166 + listen 80;
167 +
168 + client_max_body_size 512M;
169 + client_body_timeout 300s;
170 + fastcgi_buffers 64 4K;
171 +
172 + client_body_buffer_size 512k;
173 +
174 + gzip on;
175 + gzip_vary on;
176 + gzip_comp_level 4;
177 + gzip_min_length 256;
178 + gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
179 + gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
180 +
181 + add_header Referrer-Policy "no-referrer" always;
182 + add_header X-Content-Type-Options "nosniff" always;
183 + add_header X-Frame-Options "SAMEORIGIN" always;
184 + add_header X-Permitted-Cross-Domain-Policies "none" always;
185 + add_header X-Robots-Tag "noindex, nofollow" always;
186 + add_header X-XSS-Protection "1; mode=block" always;
187 +
188 + fastcgi_hide_header X-Powered-By;
189 +
190 + root /var/www/html;
191 +
192 + index index.php index.html /index.php$request_uri;
193 +
194 + location = / {
195 + if ( $http_user_agent ~ ^DavClnt ) {
196 + return 302 /remote.php/webdav/$is_args$args;
197 + }
198 + }
199 +
200 + location = /robots.txt {
201 + allow all;
202 + log_not_found off;
203 + access_log off;
204 + }
205 +
206 + location ^~ /.well-known {
207 + location = /.well-known/carddav { return 301 /remote.php/dav/; }
208 + location = /.well-known/caldav { return 301 /remote.php/dav/; }
209 + location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
210 + location /.well-known/pki-validation { try_files $uri $uri/ =404; }
211 + return 301 /index.php$request_uri;
212 + }
213 +
214 + location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
215 + location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
216 +
217 + location ~ \.php(?:$|/) {
218 + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
219 +
220 + fastcgi_split_path_info ^(.+?\.php)(/.*)$;
221 + set $path_info $fastcgi_path_info;
222 +
223 + try_files $fastcgi_script_name =404;
224 +
225 + include fastcgi_params;
226 + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
227 + fastcgi_param PATH_INFO $path_info;
228 + fastcgi_param HTTPS on;
229 +
230 + fastcgi_param modHeadersAvailable true;
231 + fastcgi_param front_controller_active true;
232 + fastcgi_pass php-handler;
233 +
234 + fastcgi_intercept_errors on;
235 + fastcgi_request_buffering off;
236 +
237 + fastcgi_max_temp_file_size 0;
238 + }
239 +
240 + location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
241 + try_files $uri /index.php$request_uri;
242 + add_header Cache-Control "public, max-age=15778463$asset_immutable";
243 + access_log off;
244 + }
245 +
246 + location ~ \.wasm$ {
247 + default_type application/wasm;
248 + }
249 +
250 + location /remote {
251 + return 301 /remote.php$request_uri;
252 + }
253 +
254 + location / {
255 + try_files $uri $uri/ /index.php$request_uri;
256 + }
257 + }
258 +}
259 +{{/code}}
260 +
261 +Hacemos lo mismo con el fichero config.php que se encuentra en el volumen app dentro del directorio config:
262 +
263 +{{code language="php"}}
264 +<?php
265 +$CONFIG = array (
266 + 'memcache.local' => '\\OC\\Memcache\\APCu',
267 + 'apps_paths' =>
268 + array (
269 + 0 =>
270 + array (
271 + 'path' => '/var/www/html/apps',
272 + 'url' => '/apps',
273 + 'writable' => true,
274 + ),
275 + 1 =>
276 + array (
277 + 'path' => '/var/www/html/custom_apps',
278 + 'url' => '/custom_apps',
279 + 'writable' => true,
280 + ),
281 + ),
282 + 'memcache.distributed' => '\\OC\\Memcache\\Redis',
283 + 'memcache.locking' => '\\OC\\Memcache\\Redis',
284 + 'redis' =>
285 + array (
286 + 'host' => 'redis',
287 + 'password' => '',
288 + 'port' => 6379,
289 + ),
290 + 'upgrade.disable-web' => true,
291 + 'instanceid' => 'ocxuwrcpcats',
292 + 'passwordsalt' => 'bFuPjx3NMpliQCtY729Uob2SRp19xe',
293 + 'secret' => 'eFMG77LAdbjw6oPSJM7hL/IDPBnP3qDxE7xlX6/uPMOvQ/kG',
294 + 'trusted_domains' =>
295 + array (
296 + 0 => '10.100.200.35:8080',
297 + 1 => 'dfacloud.ddns.net',
298 +
299 + ),
300 + 'datadirectory' => '/var/nextcloud/data',
301 + 'dbtype' => 'mysql',
302 + 'version' => '30.0.6.2',
303 + 'overwrite.cli.url' => 'https://dfacloud.ddns.net',
304 + 'dbname' => 'nextcloud',
305 + 'dbhost' => 'db',
306 + 'dbport' => '',
307 + 'dbtableprefix' => 'oc_',
308 + 'mysql.utf8mb4' => true,
309 + 'dbuser' => 'nextcloud',
310 + 'dbpassword' => 'Ko5b0sq977j1saaCQ3SD55',
311 + 'installed' => true,
312 +);
313 +{{/code}}
314 +
315 +En este fichero php tendremos que tener en cuenta modificar los valores nuestra dirección ip:puerto y nuestra dns en consecuencia.
316 +
120 120  
121 121  )))
122 122  
... ... @@ -123,6 +123,7 @@
123 123  
124 124  
125 125  
323 +
126 126  (% class="col-xs-12 col-sm-4" %)
127 127  (((
128 128  
1740216603834-462.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.dFa
Tamaño
... ... @@ -1,0 +1,1 @@
1 +21.8 KB
Contenido
1740216641833-376.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.dFa
Tamaño
... ... @@ -1,0 +1,1 @@
1 +4.6 KB
Contenido
1740216653242-590.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.dFa
Tamaño
... ... @@ -1,0 +1,1 @@
1 +19.9 KB
Contenido