++ Add nginx

This commit is contained in:
2026-03-09 16:38:22 +01:00
parent 947eb4451b
commit 851e38063d
3 changed files with 105 additions and 8 deletions

View File

@@ -1,4 +1,19 @@
services:
nginx:
image: nginx:1.27-alpine
container_name: nextcloud-nginx
restart: unless-stopped
depends_on:
- app
- collabora
ports:
- "${NGINX_PORT}:80"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
networks:
nextcloud_internal:
ipv4_address: 172.30.0.10
db:
image: mariadb:11.4
container_name: nextcloud-db
@@ -30,8 +45,8 @@ services:
depends_on:
- db
- redis
ports:
- "${NEXTCLOUD_PORT}:80"
expose:
- "80"
environment:
MYSQL_HOST: db
MYSQL_DATABASE: ${MYSQL_DATABASE}
@@ -40,7 +55,7 @@ services:
REDIS_HOST: redis
REDIS_HOST_PASSWORD: ${REDIS_PASSWORD}
NEXTCLOUD_TRUSTED_DOMAINS: ${NEXTCLOUD_DOMAIN}
TRUSTED_PROXIES: ${TRUSTED_PROXY_IP}
TRUSTED_PROXIES: ${TRUSTED_PROXIES}
OVERWRITEHOST: ${NEXTCLOUD_DOMAIN}
OVERWRITEPROTOCOL: https
OVERWRITECLIURL: https://${NEXTCLOUD_DOMAIN}
@@ -56,8 +71,8 @@ services:
image: collabora/code:latest
container_name: collabora
restart: unless-stopped
ports:
- "${COLLABORA_PORT}:9980"
expose:
- "9980"
environment:
domain: ${NEXTCLOUD_DOMAIN_REGEX}
username: ${COLLABORA_USERNAME}
@@ -77,3 +92,6 @@ volumes:
networks:
nextcloud_internal:
driver: bridge
ipam:
config:
- subnet: 172.30.0.0/24