Hi @francislavoie
Sorry for the late reply.
@francislavoie
Also, you’re exposing Caddy on different ports than the default. What are you doing with these ports? Are you port forwarding to different ports with your network router?
Actually In my digital ocean droplet I have main caddy server which is up and running in docker instance I used this main Caddy server to route my requests to other caddy servers inside the same droplet. so those caddy servers I did this port forwarding.
may be you can get understand my previous help question will attached like here.
Caddy Community Help previous question
Anyway I have changed my docker compose file without port forward here it is
version: "3"
services:
treble-solutions:
container_name: treble-solutions
image: treblesolutions/treble-solutions:${ENV}
restart: unless-stopped
build:
context: .
args:
BASE_URL=${{FRONTEND_BASE_URL_PROD }}
NODE_ENV=${{NODE_ENV_PROD }}
RESEND_API_KEY=${{RESEND_API_KEY }}
EXCHANGE_API_KEY=${{EXCHANGE_API_KEY }}
GOOGLE_ANALYTICS_KEY=${{GOOGLE_ANALYTICS_KEY }}
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=${{NEXT_PUBLIC_RECAPTCHA_SITE_KEY }}
RECAPTCHA_SECRET_KEY=${{RECAPTCHA_SECRET_KEY }}
ports:
- "7000:7000"
networks:
- caddy-network
volumes:
- caddy-data:/data
- caddy-config:/config
- /root/treble/uploads/treblesolutionsfrontenduploads/:/srv/treblesolutionsfrontenduploads
- /var/caddy-logs:/var/log/caddy
networks:
caddy-network:
external: true
volumes:
mongo-data:
driver: local
caddy-data:
driver: local
caddy-config:
driver: local
caddy-logs:
driver: local
And dockerized nextjs app is running on port 7000
Now I am getting different error like this
And here is my caddy server log.
{"level":"error","ts":1705202353.8276112,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"172.69.7.150","remote_port":"27126","client_ip":"172.69.7.150","proto":"HTTP/2.0","method":"GET","host":"www.treblesolutions.com","uri":"/opnegraph-image.jpeg","headers":{"Accept-Encoding":["gzip"],"X-Forwarded-For":["2a03:2880:10ff:c::face:b00c"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Accept":["*/*"],"User-Agent":["facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"],"Cf-Ipcountry":["US"],"Cf-Ray":["8452bc722dfa6162-ORD"],"X-Forwarded-Proto":["https"],"Cf-Connecting-Ip":["2a03:2880:10ff:c::face:b00c"],"Cdn-Loop":["cloudflare"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"www.treblesolutions.com"}},"bytes_read":0,"user_id":"","duration":0.169980784,"size":3668,"status":404,"resp_headers":{"Content-Type":["text/html; charset=utf-8"],"Content-Encoding":["gzip"],"Cache-Control":["private, no-cache, no-store, max-age=0, must-revalidate"],"X-Powered-By":["Next.js"],"Server":["Caddy"],"Alt-Svc":["h3=\":443\"; ma=2592000"],"Date":["Sun, 14 Jan 2024 03:19:13 GMT"],"Vary":["RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url, Accept-Encoding"]}}
Any clue?