SITE_NAME does not work? (docker)
wef0rm opened this issue · comments
Running this on docker with caddy. Everything seems to work, except for the site name. The site shows up empty.
![image](https://private-user-images.githubusercontent.com/94048542/267419808-44dd2384-dd9b-4cd4-8fe3-230ee4bd4fae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2ODQ2NTAsIm5iZiI6MTcxODY4NDM1MCwicGF0aCI6Ii85NDA0ODU0Mi8yNjc0MTk4MDgtNDRkZDIzODQtZGQ5Yi00Y2Q0LThmZTMtMjMwZWU0YmQ0ZmFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE4VDA0MTkxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAxZWZmOTEyMjA1NmZjOTAwYjk0OGVjZTQ1ZTlmYmJjOTM5MWRlMDU5NmZiNGNkMzI1ZjY0NjIxY2NkY2RmZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.szWYVvaE9U8hGwr9idHSdWHExI3sltGR1LHHGj4PzjE)
EDIT:
Also noticed that the site URL does not show on the site (under advanced) – just an empty dropdown list, but trying to add a domain in the settings panel gives me an error: You can't use the default domain
![image](https://private-user-images.githubusercontent.com/94048542/267425513-c48d8363-97b4-4b43-a441-148a18951db4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2ODQ2NTAsIm5iZiI6MTcxODY4NDM1MCwicGF0aCI6Ii85NDA0ODU0Mi8yNjc0MjU1MTMtYzQ4ZDgzNjMtOTdiNC00YjQzLWE0NDEtMTQ4YTE4OTUxZGI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE4VDA0MTkxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY2YWQyNzg3YWJlYTI3NmRhNDExY2RjNGVjODZkYWFiMTlkMDg3ZTY4NTY4M2RlOTQzOWVjNDEzMTg3Mjk5OTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.S2tn3EGnygIxLi-uddl7SloZ80OxG482T_UUOZpmEFE)
So something from the .env gets picked up. And e-mail works, etc. but it's not showing on the actual site.
Files:
.env file:
# general
TZ=Europe/Oslo
PUID=1000
PGID=1000
# App port to run on
PORT=3000
# The name of the site where Kutt is hosted
SITE_NAME=Test
# The domain that this website is on
DEFAULT_DOMAIN=link.domain.tld
# Generated link length
LINK_LENGTH=6
# Postgres database credential details
DB_HOST=postgres
DB_PORT=5432
DB_NAME=postgres
DB_USER=kutt
DB_PASSWORD=<pw>
DB_SSL=false
# Redis host and port
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=
# Disable registration
DISALLOW_REGISTRATION=true
# Disable anonymous link creation
DISALLOW_ANONYMOUS_LINKS=true
# 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=true
# A passphrase to encrypt JWT. Use a long and secure key.
JWT_SECRET=<redacted>
# Admin emails so they can access admin actions on settings page
# Comma seperated
ADMIN_EMAILS=hello@domain.tld
# Invisible reCaptcha secret key
# Create one in https://www.google.com/recaptcha/intro/
RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET_KEY=
# Google Cloud API to prevent from users from submitting malware URLs.
# Get it from https://developers.google.com/safe-browsing/v4/get-started
GOOGLE_SAFE_BROWSING_KEY=
# Your email host details to use to send verification emails.
# More info on http://nodemailer.com/
# Mail from example "Kutt <support@kutt.it>". Leave empty to use MAIL_USER
MAIL_HOST=kuttsmtp
MAIL_PORT=25
MAIL_SECURE=false
MAIL_USER=no-reply@domain.tld
MAIL_FROM=no-reply@domain.tld
MAIL_PASSWORD=
# The email address that will receive submitted reports.
REPORT_EMAIL=hello@domain.tld
# Support email to show on the app
CONTACT_EMAIL=hello@domain.tld
docker-compose.yml
version: '3.7'
services:
kutt:
image: kutt/kutt
depends_on:
- postgres
- redis
- smtp
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
#ports:
# - "3000:3000"
networks:
- web
- backend
env_file:
- .env
environment:
PUID: ${PUID}
PGID: ${PGID}
TZ: ${TZ}
DB_HOST: postgres
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
REDIS_HOST: redis
redis:
image: redis:6.0-alpine
networks:
- backend
volumes:
- ./redis_data:/data
postgres:
image: postgres:12-alpine
networks:
- backend
environment:
PUID: ${PUID}
PGID: ${PGID}
TZ: ${TZ}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- ./postgres_data:/var/lib/postgresql/data
smtp:
image: ixdotai/smtp:latest
container_name: kuttsmtp
restart: always
networks:
- backend
environment:
PUID: ${PUID}
PGID: ${PGID}
TZ: ${TZ}
RELAY_DOMAINS: :domain.tld
networks:
web:
name: web
external: true
backend:
name: backend
I confirm the same issue here .
The site name is not displaying .
Are there any developments underway on this entire project ?
I think you have to set it in the settings page
@rfedoruk in what level ? I can't see any input about that ! and what is the purpose of having that line in the beginning of the .env file ?
I am not sure what the purpose of having that line is, I only recently self hosted this myself, but if you go into the settings page on an admin account, there is a place to add a custom domain, you can set that there. But I didn't and my links still work
I have the same issue. The client part just seems to ignore all environment variables. The link in the terms of service is just https:// and redirects to undefined.
The SITE-NAME
is used for the Email signature. It looks like this:
<SITE-NAME> | Free & open source URL shortener
Which also points to your DEFAULT_DOMAIN
.
However, when you visit the official website kutt.it
, you see the name Kutt
just right to the logo. I think it's their <SITE-NAME>
and I guess this is a bug for docker version that the site-name is not shown in the self hosted version.
Works for me:
version: "3"
services:
kutt:
build: .
depends_on:
- postgres
- redis
- mailpit
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
ports:
- "3010:3010"
env_file:
- .env
environment:
DB_HOST: postgres
DB_NAME: kutt
DB_USER: user
DB_PASSWORD: pass
REDIS_HOST: redis
volumes:
- ./.env:/usr/src/app/.env
redis:
image: redis:6.0-alpine
volumes:
- redis_data:/data
mailpit:
image: axllent/mailpit:latest
ports:
- "8025:8025"
- "1025:1025"
volumes:
- mailpit_data:/data
environment:
MP_MAX_MESSAGES: 5000
MP_DATABASE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
postgres:
image: postgres:12-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
POSTGRES_DB: kutt
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
redis_data:
postgres_data:
mailpit_data: