kutt icon indicating copy to clipboard operation
kutt copied to clipboard

It always kept redirecting to localhost:3000

Open patchint opened this issue 1 year ago • 7 comments

Configurations docker-compose

 kutt:
    image: kutt/kutt:latest
    restart: always
    depends_on:
      - postgresql
      - redis-kutt
    command: ["./wait-for-it.sh", "postgresql:5432", "--", "npm", "start"]
    environment:
      - SITE_NAME=
      - DEFAULT_DOMAIN=link.patchli.fr
      - CUSTOM_DOMAIN_USE_HTTPS=true
      - PORT=3000
      # Postgres 
      - DB_HOST=postgresql
      - DB_PORT=5432
      - DB_NAME=kutt
      - DB_USER=kutt
      - DB_PASSWORD=
      - DB_SSL=false
      # Redis for caching
      - REDIS_HOST=redis-kutt
      - REDIS_PORT=6379
      - REDIS_PASSWORD=
      - REDIS_DB=0
      - DISALLOW_REGISTRATION=false
      - DISALLOW_ANONYMOUS_LINKS=false
      # The daily limit for each user
      - USER_LIMIT_PER_DAY=50
      # Cooldown in minutes
      - NON_USER_COOLDOWN=0
      - DEFAULT_MAX_STATS_PER_LINK=50000
      # Email
      - MAIL_HOST=
      - MAIL_PORT=
      - MAIL_SECURE=true
      - MAIL_USER=
      - MAIL_FROM=
      - MAIL_PASSWORD=
      # Reporting and admin email
      - ADMIN_EMAILS=
      - REPORT_EMAIL=
      - CONTACT_EMAIL=
      # Link lenght
      - LINK_LENGTH=6
      # Google keys to search for malwares
      - GOOGLE_SAFE_BROWSING_KEY=
      - JWT_SECRET=
    networks:
      - internet
      - no-internet
    cap_drop:
      - ALL
    security_opt:
      - apparmor=docker-default
 nginx
     ...
     	set $upstream kutt:3000;

	location / {
		proxy_pass http://$upstream;
		proxy_hide_header X-Powered-By;
	}
     ...

docker logs

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

patchint avatar May 01 '23 16:05 patchint

Blank variables are password or private configurations etc etc

patchint avatar May 01 '23 16:05 patchint

@patchint did you managed to get it working ? i have the same issues

ksingh7 avatar May 15 '23 12:05 ksingh7

Pass the correct header in location / block

       proxy_set_header                link.patchli.fr;

Write avatar May 20 '23 15:05 Write

It's always going to run on localhost with the specified port. Re-evaluate your proxy settings.

kengher avatar Aug 01 '23 23:08 kengher

same issues +

Marjani avatar Oct 06 '23 20:10 Marjani

+1

xdkaka avatar Nov 29 '23 01:11 xdkaka

Pass the correct header in location / block

       proxy_set_header                link.patchli.fr;

Hi, sorry for my late answer, I haven't test it yet. But I don't think that would fix the issue :/

patchint avatar Dec 27 '23 14:12 patchint