getfider / fider

Open platform to collect and prioritize feedback
https://fider.io
GNU Affero General Public License v3.0
2.75k stars 620 forks source link

[BUG] App starts up with blank page when running docker container #1144

Closed peter-dough closed 10 months ago

peter-dough commented 11 months ago

Fider Cloud or Self Hosted Self Hosted in local environment. I am using the docker container getfider/fider:main

Describe the bug The app starts up successfully however I am getting a blank page when visiting https://suggestions.dev:3000/signup.

FYI, I also have SSL successfully enabled in my local environment.

To Reproduce Steps to reproduce the behavior:

Prior to running, here are the environment variables I am using:

  BASE_URL: "https://suggestions.dev"
  EMAIL_NOREPLY: "noreply@yourdomain.com"
  EMAIL_SMTP_HOST: "smtp.yourdomain.com"
  EMAIL_SMTP_PORT: "587"
  EMAIL_SMTP_USERNAME: "user@yourdomain.com"
  EMAIL_SMTP_PASSWORD: "s0m3p4ssw0rd"
  EMAIL_SMTP_ENABLE_STARTTLS: "true"
  SSL_CERT: "suggestions-dev.crt"
  SSL_CERT_KEY: "suggestions-dev.key"
  1. Execute docker compose to run fider and postgres
  2. Open browser and visit http://suggestions.dev:3000

Expected behavior Javascripts and assets should load successfully.

Screenshots

image

Additional context The same error occurs whether I have SSL enabled or not. I suspect something else is going on. I am also running this out of the box with minimal configurations. Is there something I'm missing?

peter-dough commented 11 months ago

@goenning Would you be able to assist with getting some 👀 on this?

peter-dough commented 10 months ago

I was able to resolve the issue. Looks like the documentation related to docker needs to have default base url updated to http://localhost instead of https://feedback.yoursite.com.

In summary, the assets are unable to load since the local env is unable to reach https://feedback.yoursite.com hence net::ERR_CONNECTION_REFUSED. The only way a custom base_url works is if fider is actually being hosted where the corresponding dns records are configured/active.

askchrisn commented 7 months ago

@peter-dough I have had the same issue. Running no SSL and changed the default config to http://localhost and I am still having the same issue

Any thoughts?

peter-dough commented 7 months ago

@askchrisn Here is the docker-compose file I'm using which should work. Once its up and running, you can access fider at http://localhost.

version: '2'
services:
  db:
    restart: always
    image: postgres:12
    volumes:
      - /var/fider/pg_data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: fider
      POSTGRES_PASSWORD: s0m3g00dp4ssw0rd
  app:
    restart: always
    image: getfider/fider:stable
    ports:
      - "80:3000"
    environment:
      # Public Host Name
      BASE_URL: http://localhost
      #HOST_DOMAIN: http://localhost

      #HOST_DOMAIN: https://feedback.yoursite.com
      # Connection string to the PostgreSQL database
      DATABASE_URL: postgres://fider:s0m3g00dp4ssw0rd@db:5432/fider?sslmode=disable

      # Generate a 512-bit secret here https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx
      JWT_SECRET: VERY_STRONG_SECRET_SHOULD_BE_USED_HERE

      # From which account e-mails will be sent
      EMAIL_NOREPLY: fider@dlocalhost.dev

      ###
      # EMAIL
      # Either EMAIL_MAILGUN_* or EMAIL_SMTP_* or EMAIL_AWSSES_* is required
      ###

      # EMAIL_MAILGUN_API: key-yourkeygoeshere
      # EMAIL_MAILGUN_DOMAIN: yourdomain.com
      # EMAIL_MAILGUN_REGION: US

      EMAIL_SMTP_HOST: smtp.gmail.com
      EMAIL_SMTP_PORT: 465
      EMAIL_SMTP_USERNAME: fider@dlocalhost.dev
      EMAIL_SMTP_PASSWORD: fiderfeedback
      EMAIL_SMTP_ENABLE_STARTTLS: 'false'

      # EMAIL_AWSSES_REGION: us-east-1
      # EMAIL_AWSSES_ACCESS_KEY_ID: youraccesskeygoeshere
      # EMAIL_AWSSES_SECRET_ACCESS_KEY: yoursecretkeygoeshere
askchrisn commented 7 months ago

@peter-dough Thanks! I changed the external port from 80 to 81... Maybe thats why?

peter-dough commented 7 months ago

No problem! Yeah, if the port has changed then you'll need to declare it your browser as well