@@ -63,9 +63,12 @@ This Dockerfile:
6363
6464``` yaml
6565services :
66+ # Note: PostgreSQL is an external service. You can find more information about the configuration here:
67+ # https://hub.docker.com/_/postgres
6668 db :
67- image : postgres:16-alpine
68- restart : unless-stopped
69+ image : postgres:18-alpine
70+ # Note: Check the recommend version here: https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html#server
71+ restart : always
6972 volumes :
7073 - db:/var/lib/postgresql/data:Z
7174 environment :
@@ -75,9 +78,9 @@ services:
7578
7679 app :
7780 build : ./
78- restart : unless-stopped
81+ restart : always
7982 volumes :
80- - nextcloud:/var/www/html
83+ - nextcloud:/var/www/html:Z
8184 - /var/run/docker.sock:/var/run/docker.sock
8285 networks :
8386 - default
@@ -92,34 +95,78 @@ services:
9295 - db
9396 - redis
9497
98+ # Note: Redis is an external service. You can find more information about the configuration here:
99+ # https://hub.docker.com/_/redis
95100 redis :
96101 image : redis:alpine
97- restart : unless-stopped
98-
102+ restart : always
103+
104+ # Note: Nginx is an external service. You can find more information about the configuration here:
105+ # https://hub.docker.com/_/nginx/
99106 web :
100107 image : nginx:alpine
101- restart : unless-stopped
108+ restart : always
102109 hostname : web
103110 volumes :
104- - nextcloud:/var/www/html:ro
111+ - nextcloud:/var/www/html:z, ro
105112 - ./nginx.conf:/etc/nginx/nginx.conf:ro # https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html
106- expose :
107- - 80
113+ environment :
114+ - VIRTUAL_HOST=
115+ - LETSENCRYPT_HOST=
116+ - LETSENCRYPT_EMAIL=
108117 depends_on :
109118 - app
110119 networks :
111120 - default
112- - proxy
121+ - proxy-tier
113122 - appapi
123+
124+ # Note: Nginx-proxy is an external service. You can find more information about the configuration here:
125+ # Warning: Do not use :latest tags of nginx-proxy unless absolutely sure about the consequences.
126+ # https://hub.docker.com/r/nginxproxy/nginx-proxy
127+ proxy :
128+ build : ./proxy
129+ restart : always
130+ ports :
131+ - 80:80
132+ - 443:443
133+ labels :
134+ - " com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
135+ volumes :
136+ - certs:/etc/nginx/certs:z,ro
137+ - vhost.d:/etc/nginx/vhost.d:z
138+ - html:/usr/share/nginx/html:z
139+ - /var/run/docker.sock:/tmp/docker.sock:z,ro
140+ networks :
141+ - proxy-tier-tier
142+
143+ # Note: Letsencrypt companion is an external service. You can find more information about the configuration here:
144+ # https://hub.docker.com/r/nginxproxy/acme-companion
145+ letsencrypt-companion :
146+ image : nginxproxy/acme-companion
147+ restart : always
148+ volumes :
149+ - certs:/etc/nginx/certs:z
150+ - acme:/etc/acme.sh:z
151+ - vhost.d:/etc/nginx/vhost.d:z
152+ - html:/usr/share/nginx/html:z
153+ - /var/run/docker.sock:/var/run/docker.sock:z,ro
154+ environment :
155+ - DEFAULT_EMAIL=
156+ networks :
157+ - proxy-tier
158+ depends_on :
159+ - proxy
114160
115161 cron :
116162 build : ./
117- restart : unless-stopped
163+ restart : always
118164 networks :
119165 - default
120166 - appapi
121167 volumes :
122- - nextcloud:/var/www/html
168+ - nextcloud:/var/www/html:z
169+ # NOTE: The `volumes` config of the `cron` and `app` containers must match
123170 entrypoint : /cron.sh
124171 depends_on :
125172 - db
@@ -132,18 +179,16 @@ services:
132179 privileged : true
133180 image : ghcr.io/nextcloud/nextcloud-appapi-harp:release
134181 networks :
135- - proxy
182+ - proxy-tier
136183 - appapi
137- restart : unless-stopped
184+ restart : always
138185 depends_on :
139186 - app
140- # env_file:
141- # - appapi.env
142187 environment :
143188 # NC_HAPROXY_PASSWORD needs to be at least 12 chars long. This variable exists for backward compatibility with the DSP image
144189 # ToDo: verify whether this variable is still required
145190 - NC_HAPROXY_PASSWORD=CHANGEME1234
146- # HP_SHARED_KEY needs to be at least 12 chars long.
191+ # HP_SHARED_KEY needs to be at least 12 chars long.
147192 - HP_SHARED_KEY=CHANGEME1234
148193 # NC_INSTANCE_URL must be the externally accessible URL of the Nextcloud instance
149194 - NC_INSTANCE_URL=https://external-nextcloud.url
@@ -153,12 +198,13 @@ services:
153198volumes :
154199 db :
155200 nextcloud :
201+ certs :
202+ acme :
203+ vhost.d :
204+ html :
156205
157206networks :
158- proxy : # This is an external network created for nginx-proxy-manager used by this setup. It must be edited to match your environment.
159- name : proxy-manager_proxy_network
160- external : true
161-
207+ proxy-tier :
162208 appapi : # This network is required in order for AppAPI to function correctly. Using "host" networking as in some examples may fail.
163209 name : appapi_network
164210` ` `
0 commit comments