Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] caddy setup with http error 502 #1330

Closed
4 tasks done
zuble opened this issue Sep 23, 2023 · 6 comments
Closed
4 tasks done

[QUESTION] caddy setup with http error 502 #1330

zuble opened this issue Sep 23, 2023 · 6 comments
Labels
🕸️ Inactive 🤷‍♂️ Question [ISSUE] Further information is requested

Comments

@zuble
Copy link

zuble commented Sep 23, 2023

docker-compose.yml

---
version: "3.8"
services:
  dashy:
    # To build from source, replace 'image: lissy93/dashy' with 'build: .'
    # build: .
    image: lissy93/dashy
    container_name: Dashy
    # Pass in your config file below, by specifying the path on your host machine
    # volumes:
      # - /root/my-config.yml:/app/public/conf.yml
    ports:
      - "4000:80"
    # Set any environmental variables
    environment:
      - NODE_ENV=production
    # Specify your user ID and group ID. You can find this by running `id -u` and `id -g`
    #  - UID=1000
    #  - GID=1000
    # Specify restart policy
    restart: unless-stopped
    # Configure healthchecks
    healthcheck:
      test: ['CMD', 'node', '/app/services/healthcheck']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s

networks:
  default:
    name: $DOCKER_MY_NETWORK
    external: true

Caddyfile

dash.{$MY_DOMAIN} {
        header {
                X-Frame-Options SAMEORIGIN
                X-Robots-Tag "none"
        }

        encode gzip

        reverse_proxy dashy:4000
}

tried with ant wihout the options of header and still white screen with http error 502

the dashy container is running healthy

yarn run v1.22.15
$ node server
Checking config file against schema...
✔️ Config file is valid, no issues found
SSL Not Enabled: Public key not present

Welcome to Dashy! 🚀
Your new dashboard is now up and running with Docker
Using Dashy V-2.1.1. Update Check Complete
✅ Dashy is Up-to-Date

and here are the logs from caddy container
ERR ts=1695506363.1284177 logger=http.log.error msg=dial tcp 172.18.0.6:4000: connect: connection refused request={"remote_ip":" ","remote_port":" ","client_ip":" ","proto":"HTTP/2.0","method":"GET","host":"dash.******","uri":"/","headers":{"Upgrade-Insecure-Requests":["1"],"Sec-Fetch-Dest":["document"],"Sec-Fetch-Site":["none"],"Sec-Fetch-User":["?1"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"],"Accept-Language":["en-US,en;q=0.5"],"Dnt":["1"],"Sec-Fetch-Mode":["navigate"],"Te":["trailers"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; rv:112.0) Gecko/20100101 Firefox/112.0"],"Accept-Encoding":["gzip, deflate, br"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"dash.******"}} duration=0.003785185 status=502 err_id=2sem9u7vc err_trace=reverseproxy.statusError (reverseproxy.go:1246)

anyone has experience setting things up using caddy ?
thanks in advance

Category

Setup and Deployment

Please tick the boxes

@zuble zuble added the 🤷‍♂️ Question [ISSUE] Further information is requested label Sep 23, 2023
@liss-bot
Copy link
Collaborator

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

@zuble zuble changed the title [QUESTION] caddy setup [QUESTION] caddy setup with http error 502 Sep 24, 2023
@zuble
Copy link
Author

zuble commented Sep 28, 2023

@Lissy93 any help/idea on this ?

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 28, 2023
@liss-bot
Copy link
Collaborator

This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

@liss-bot liss-bot added ⚰️ Stale [ISSUE] [PR] No activity for over 1 month and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Dec 28, 2023
@liss-bot
Copy link
Collaborator

liss-bot commented Jan 2, 2024

This issue was automatically closed because it has been stalled for over 1 year with no activity.

@liss-bot liss-bot closed this as completed Jan 2, 2024
@liss-bot liss-bot removed the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Jan 2, 2024
@njakes
Copy link

njakes commented Jan 19, 2024

I too would like to see some input on this. I am able to use tailscale to access dashy but it is unusable with caddy at the moment.

@aboul
Copy link

aboul commented Sep 27, 2024

@njakes Inspect your dashy container withdocker inspect <dashy_container> | grep -A2 "Ports". The number of port should be used in your Caddyfile (reverse_proxy <dashy_container>:<port_number>) and your dashy container should be on the same network as your caddy container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕸️ Inactive 🤷‍♂️ Question [ISSUE] Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants