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

[Bug]: Traefik cannot resolve instance #1736

Closed
1 task done
dreamwhite opened this issue Sep 25, 2023 · 8 comments
Closed
1 task done

[Bug]: Traefik cannot resolve instance #1736

dreamwhite opened this issue Sep 25, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@dreamwhite
Copy link

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

I'm running Actual Budget using the following docker-compose.yml file:

version: '3.3'
services:
  my_actual_budget:
    image: actualbudget/actual-server:latest
    container_name: my_actual_budget
    restart: always
#    ports: <-------------------------- Commented this section since Traefik can detect internal docker container ports
#      - "5006:5006"

    volumes:
      - ./data:/data
    labels:
      - traefik.http.routers.actual-budget.rule=Host(`actual.my_domain.com`)
      - traefik.port=5006
      - traefik.http.routers.actual-budget.tls=true
      - traefik.http.routers.actual-budget.tls.certresolver=lets-encrypt
    networks:
      - web

networks:
  web:
    external: true

Visiting my domain leads to a generic error 404, but if I open the ports I can correctly reach the service (my_domain.com:5006).

I had similar issues with other applications served via Docker, but in the majority of cases setting the APP_URL environment variable seemed to do the trick. Is there anything similar on this project?

Thanks in advance :)
dreamwhite

What error did you receive?

No response

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge, Desktop App (Electron), Other

Operating System

Mac OSX

@dreamwhite dreamwhite added the bug Something isn't working label Sep 25, 2023
@hkamran80
Copy link

I use this configuration in my Compose file.

labels:
      - "traefik.enable=true"
      - "traefik.http.routers.actual.rule=Host(`actual.mydomain.com`)"
      - "traefik.http.routers.actual.entrypoints=websecure"
      - "traefik.http.routers.actual.tls.certresolver=letsencrypt"

@dreamwhite
Copy link
Author

I still get a Bad Gateway error. Don't know why. Can you please attach your docker-compose.yml?

@hkamran80
Copy link

Sure.

services:
  actual_server:
    image: actualbudget/actual-server:latest
    container_name: actual-server
    restart: unless-stopped
    networks:
      - traefik_default
    environment:
      ACTUAL_NORDIGEN_SECRET_ID: [redacted]
      ACTUAL_NORDIGEN_SECRET_KEY: [redacted]
    volumes:
      - ./actual-data:/data
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.actual.rule=Host(`actual.mydomain.com`)"
      - "traefik.http.routers.actual.entrypoints=websecure"
      - "traefik.http.routers.actual.tls.certresolver=letsencrypt"

networks:
  traefik_default:
    external: true

@dreamwhite
Copy link
Author

Alright. I'm using the following docker-compose.yml file but when I visit actual.mydomain.com I get a HTTP error 502 Bad Gateway.

version: '3.8'
services:
  my_actual_budget:
    image: actualbudget/actual-server:latest
    container_name: my_actual_budget
    restart: always
    volumes:
      - ./data:/data
    labels:
      - traefik.http.routers.actual-budget.rule=Host(`actual-budget.mydomain.com`)
      - traefik.port=5006
      - traefik.http.routers.actual-budget.tls=true
      - traefik.http.routers.actual-budget.tls.certresolver=lets-encrypt
    networks:
      - web

networks:
  web:
    external: true

What's wrong?

@dreamwhite
Copy link
Author

I still get the same bad gateway error :'(

@hkamran80
Copy link

hkamran80 commented Sep 27, 2023

Is mydomain.com (or whatever domain you're actually using) set up in Traefik correctly? That was my main problem until I fixed it. Don't make the same mistake I did and make sure to use a domain you own.

Try replacing the labels that you have with the one I have.

@MatissJanis
Copy link
Member

👋 This is not really a bug report, so I'll close off this issue.

Feel free to continue conversing here though. The commenting is not locked.

Or - you can always reach out on discord. Discord is a better spot for tech support of Actual.

@dreamwhite
Copy link
Author

Is mydomain.com (or whatever domain you're actually using) set up in Traefik correctly? That was my main problem until I fixed it. Don't make the same mistake I did and make sure to use a domain you own.

Try replacing the labels that you have with the one I have.

Good evening. I think the real problem was that I was using the old actual-data data volume. Removing it and recreating from zero fixed the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants