So I decided to create a stack to use with my docker swarm framework.
This is my stack:
version: "3.7"
services:
nextcloud:
image: nextcloud:latest
restart: unless-stopped
volumes:
- nextcloud-data:/var/www/html
ports:
- "84:80"
environment:
TZ: America/Fortaleza
POSTGRES_HOST: pgbouncer
DB_PORT: 5432
POSTGRES_DB: nextcloud
POSTGRES_USER: postgres
POSTGRES_PASSWORD: xxxxxxxxxxxxxx
REDIS_HOST: redis
REDIS_HOST_PORT: 6379
REDIS_HOST_PASSWORD: xxxxxxxxxxxxxxxxxxxxx
NEXTCLOUD_ADMIN_USER: xxxxxxxxxxxxxxx
NEXTCLOUD_ADMIN_PASSWORD: xxxxxxxxxxxxxxxxx
NEXTCLOUD_TRUSTED_DOMAINS: word.admin.test.com
TRUSTED_PROXIES:
OVERWRITECLIURL: https://word.admin.test.com
OVERWRITEPROTOCOL: https
OVERWRITEHOST: word.admin.test.com
APACHE_BODY_LIMIT: 1073741824
networks:
- network_public
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
deploy:
placement:
constraints:
- node.role == manager
resources:
limits:
cpus: "1"
memory: 1024M
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.entrypoints=web-secure"
- "traefik.http.routers.nextcloud.rule=Host(`word.admin.test.com`)" # change hostname!
- "traefik.http.routers.nextcloud.tls=true"
- "traefik.http.routers.nextcloud.tls.certresolver=tlschallenge"
- "traefik.http.routers.nextcloud.middlewares=secHeaders@file"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80" # set port the container listenes to
volumes:
nextcloud-data:
external: true
name: nextcloud-data
networks:
network_public:
external: true
name: network_public
Everything seems to work fine, the database is created in postgres, the tables are created.
When I access the site, I get this error:
I went to check the log, it tells me this, I’ve made all the possible changes and I can’t solve it.
[25/Jan/2024:20:19:03 -0300] "GET / HTTP/1.1" 302 1647 "-" "curl/7.88.1"[25/Jan/2024:20:19:03 -0300] "GET / HTTP/1.1" 302 1647 "-" "curl/7.88.1"
It seems that the system is redirecting the page, I went to the config.php file and the settings there are apparently all correct.
If anyone can help, thank you.