kutt
kutt copied to clipboard
It always kept redirecting to localhost:3000
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
Blank variables are password or private configurations etc etc
@patchint did you managed to get it working ? i have the same issues
Pass the correct header in location / block
proxy_set_header link.patchli.fr;
It's always going to run on localhost with the specified port. Re-evaluate your proxy settings.
same issues +
+1
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 :/