Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation and examples update for use with docker compose v2 #2201

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: '3'

services:
db:
image: mariadb:10.6
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
image: mariadb:10.8.2
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
restart: always
tzerber marked this conversation as resolved.
Show resolved Hide resolved
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- db:/var/lib/mysql:Z
environment:
Expand All @@ -21,6 +23,10 @@ services:
app:
image: nextcloud:apache
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
ports:
- 127.0.0.1:8080:80
volumes:
Expand All @@ -37,6 +43,10 @@ services:
cron:
image: nextcloud:apache
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: '3'

services:
db:
image: mariadb:10.6
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
image: mariadb:10.8.2
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- db:/var/lib/mysql:Z
environment:
Expand All @@ -21,6 +23,10 @@ services:
app:
image: nextcloud:fpm-alpine
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- nextcloud:/var/www/html:z
environment:
Expand All @@ -35,6 +41,10 @@ services:
web:
build: ./web
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
ports:
- 127.0.0.1:8080:80
volumes:
Expand All @@ -45,6 +55,10 @@ services:
cron:
image: nextcloud:fpm-alpine
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
COPY mime.types /etc/nginx/mime.types
99 changes: 99 additions & 0 deletions .examples/docker-compose/insecure/mariadb/fpm/web/mime.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@

types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
text/javascript mjs js;
tzerber marked this conversation as resolved.
Show resolved Hide resolved
application/atom+xml atom;
application/rss+xml rss;

text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;

image/avif avif;
image/png png;
image/svg+xml svg svgz;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/webp webp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;

font/woff woff;
font/woff2 woff2;

application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.oasis.opendocument.graphics odg;
application/vnd.oasis.opendocument.presentation odp;
application/vnd.oasis.opendocument.spreadsheet ods;
application/vnd.oasis.opendocument.text odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation
pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xlsx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document
docx;
application/vnd.wap.wmlc wmlc;
application/wasm wasm;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;

application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;

audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;

video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
26 changes: 9 additions & 17 deletions .examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ http {
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default "immutable";
default ", immutable";
}

#gzip on;
Expand Down Expand Up @@ -162,24 +162,16 @@ http {
fastcgi_max_temp_file_size 0;
}

# Javascript mimetype fixes for nginx
# Note: The block below should be removed, and the js|mjs section should be
# added to the block below this one. This is a temporary fix until Nginx
# upstream fixes the js mime-type
location ~* \.(?:js|mjs)$ {
types {
text/javascript js mjs;
}
default_type "text/javascript";
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off;
}

# Serve static files
location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
add_header Cache-Control "public, max-age=15778463$asset_immutable";
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
access_log off; # Optional: Don't log access to assets

location ~ \.wasm$ {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
version: '3'

services:
db:
image: postgres:alpine
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- db:/var/lib/postgresql/data:Z
env_file:
Expand All @@ -16,6 +18,10 @@ services:
app:
image: nextcloud:apache
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
ports:
- 127.0.0.1:8080:80
volumes:
Expand All @@ -32,6 +38,10 @@ services:
cron:
image: nextcloud:apache
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
Expand All @@ -41,4 +51,4 @@ services:

volumes:
db:
nextcloud:
nextcloud:
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
version: '3'

services:
db:
image: postgres:alpine
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- db:/var/lib/postgresql/data:z
- db:/var/lib/postgresql/data:Z
env_file:
- db.env

Expand All @@ -16,6 +18,10 @@ services:
app:
image: nextcloud:fpm-alpine
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- nextcloud:/var/www/html:z
environment:
Expand All @@ -30,6 +36,10 @@ services:
web:
build: ./web
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
ports:
- 127.0.0.1:8080:80
volumes:
Expand All @@ -40,6 +50,10 @@ services:
cron:
image: nextcloud:fpm-alpine
restart: always
logging:
driver: "json-file"
options:
max-size: "50m"
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
COPY mime.types /etc/nginx/mime.types