Closed cellulosa closed 1 year ago
I think it's something to do with resources being called via http despite the APP_URL
is set to enforce https://my-domain.com and APP_ENV
is set to production (see this)
after doing some digging on the repo, I managed to get it working by adding - APP_TRUSTED_PROXIES=*
.
I will open a PR to provide some instructions for others!
after doing some digging on the repo, I managed to get it working by adding
- APP_TRUSTED_PROXIES=*
.I will open a PR to provide some instructions for others!
Did you need anything else? I am in the same situation and running out of options.
APP_ENV=production
APP_URL=
APP_TRUSTED_PROXIES=*
No luck. Has anything changed from a Chandler perspective? Don't have the same issue with the old Monica deployment.
cc @djaiss have there been any changes in the underlying proxy at all?
here is my full config:
monica:
container_name: monica
image: ghcr.io/monicahq/monica-next:main
volumes:
- ${DOCKER_CONFIG_DIR}/monica/database.sqlite:/var/www/html/storage/database.sqlite
environment:
- APP_ENV=production
- APP_URL=https://monica.my-website.com
- APP_TRUSTED_PROXIES=*
- APP_KEY=${MONICA_APP_KEY}
- DB_DATABASE=/var/www/html/storage/database.sqlite
- DB_PASSWORD=${MONICA_MYSQL_PASS}
- MAIL_MAILER=log
- LOCATION_IQ_API_KEY=${MONICA_LOCATION_IQ_API_KEY}
- MAPBOX_API_KEY=${MONICA_MAPBOX_API_KEY}
- MAPBOX_USERNAME=${MONICA_MAPBOX_USERNAME}
- UPLOADCARE_PUBLIC_KEY=${MONICA_UPLOADCARE_PUBLIC_KEY}
- UPLOADCARE_PRIVATE_KEY=${MONICA_UPLOADCARE_PRIVATE_KEY}
ports:
- 8080:80
restart: unless-stopped
I then have Caddy running locally that proxies to Monica with:
(cert) {
tls {
dns cloudflare {$CLOUDFLARE_API_TOKEN}
}
}
monica.my-website.com {
import cert
reverse_proxy :8080
}
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Bug description
Hi there, I just got up and running the latest version of Monica (Chandler) on Docker.
I notice that if I omit the port declaration, so as to connect to monica via a caddy proxy, there are all sorts of errors being thrown e.g. corss or 419 or Blocked loading mixed active content errors.
How to reproduce
Add the following on
docker-compose.yml
and start withdocker-compose up
.Have configured Caddyfile to proxy with (this works for other services because caddy runs within docker):
Environment