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

redirection issues #743

Open
Go0ners opened this issue Mar 26, 2024 · 2 comments
Open

redirection issues #743

Go0ners opened this issue Mar 26, 2024 · 2 comments

Comments

@Go0ners
Copy link

Go0ners commented Mar 26, 2024

Hi,

I have a problem with Kutt/Docker.
I can't figure out why when I launch the container, and put the kutt url in firefox, it instantly redirects to https://localhost.

Here is my configuration:

Docker compose :

version: "3.9"

services:
  kutt:
    image: 'kutt/kutt'
    container_name: 'kutt'
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.kutt.entryPoints=https'
      - 'traefik.http.routers.kutt.rule=Host('${KUTT_HOST}')'
      - 'traefik.http.routers.kutt.tls.certResolver=le'
      - 'traefik.http.services.kutt.loadBalancer.server.port=3000'
    depends_on:
      - 'kutt-postgres'
      - 'kutt-redis'
    env_file:
      - '.env'
    command: ["./wait-for-it.sh", "host:5432", "--", "npm", "start"]
    environment:
      - 'PUID=1000'
      - 'PGID=1000'
      - 'TZ=Europe/Paris'
      - 'DB_HOST=${KUTT_DB_HOST}'
      - 'DB_NAME=${KUTT_DB_NAME}'
      - 'DB_USER=${KUTT_DB_USER}'
      - 'DB_PASSWORD=${KUTT_DB_PASS}'
      - 'REDIS_HOST=${KUTT_REDIS_HOST}'
    volumes:
      - './logs:/root/.npm/_logs/'

  kutt-redis:
    container_name: 'kutt-redis'
    image: 'redis:6.0-alpine'
    volumes:
      - './redis_data:/data'

  kutt-postgres:
    container_name: 'kutt-postrgre'
    image: 'postgres:12-alpine'
    environment:
      - 'POSTGRES_DB=${KUTT_PGSQL_NAME}'
      - 'POSTGRES_USER=${KUTT_PGSQL_USER}'
      - 'POSTGRES_PASSWORD=${KUTT_PGSQL_PASS}'
    volumes:
      - './postgres_data:/var/lib/postgresql/data'

.env file :

`# App port to run on
PORT='3000'

# The name of the site where Kutt is hosted
SITE_NAME='name'

# The domain that this website is on
DEFAULT_DOMAIN='url.url.tld'

# Generated link length
LINK_LENGTH='6'

# Postgres database credential details
DB_HOST='host'
DB_PORT='5432'
DB_NAME='name'
DB_USER='user'
DB_PASSWORD='pwd'
DB_SSL='false'

# Redis host and port
REDIS_HOST='host'
REDIS_PORT='6379'
REDIS_PASSWORD=''
REDIS_DB='kutt'

# Disable registration
DISALLOW_REGISTRATION='false'

# Disable anonymous link creation
DISALLOW_ANONYMOUS_LINKS='false'

# The daily limit for each user
USER_LIMIT_PER_DAY='50'

# Create a cooldown for non-logged in users in minutes
# Set 0 to disable
NON_USER_COOLDOWN='0'

# Max number of visits for each link to have detailed stats
DEFAULT_MAX_STATS_PER_LINK='5000'

# Use HTTPS for links with custom domain
CUSTOM_DOMAIN_USE_HTTPS='false'

# A passphrase to encrypt JWT. Use a long and secure key.
JWT_SECRET='jwt'

# Admin emails so they can access admin actions on settings page
# Comma seperated
ADMIN_EMAILS='mail'

# Invisible reCaptcha secret key
# Create one in https://www.google.com/recaptcha/intro/
RECAPTCHA_SITE_KEY='key'
RECAPTCHA_SECRET_KEY='secret-'

# Your email host details to use to send verification emails.
# More info on http://nodemailer.com/
# Mail from example "Kutt <[email protected]>". Leave empty to use MAIL_USER
MAIL_HOST='smtp'
MAIL_PORT='port'
MAIL_SECURE='true'
MAIL_USER='mail'
MAIL_FROM='URL <name>'
MAIL_PASSWORD='pwd'

# The email address that will receive submitted reports.
REPORT_EMAIL='mail'

# Support email to show on the app
CONTACT_EMAIL='mail'`

logs :

kutt  | wait-for-it.sh: host:5432 is available after 0 seconds
kutt  |
kutt  | > [email protected] start /usr/src/app
kutt  | > npm run migrate && cross-env NODE_ENV=production node production-server/server.js
kutt  |
kutt  |
kutt  | > [email protected] migrate /usr/src/app
kutt  | > knex migrate:latest --env production
kutt  |
kutt  | Requiring external module ts-node/register
kutt  | Using environment: production
kutt  | Already up to date
kutt  | > Ready on http://localhost:3000```
@kengher
Copy link

kengher commented Apr 8, 2024

have you by chance set up proxy pass on your server?

@semaf
Copy link

semaf commented May 12, 2024

Seems that the guys do not care about the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants