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

SITE_NAME does not work? (docker) #710

Open
wef0rm opened this issue Sep 12, 2023 · 8 comments
Open

SITE_NAME does not work? (docker) #710

wef0rm opened this issue Sep 12, 2023 · 8 comments

Comments

@wef0rm
Copy link

wef0rm commented Sep 12, 2023

Running this on docker with caddy. Everything seems to work, except for the site name. The site shows up empty.

image

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

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
[email protected]

# 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 <[email protected]>". Leave empty to use MAIL_USER
MAIL_HOST=kuttsmtp
MAIL_PORT=25
MAIL_SECURE=false
[email protected]
[email protected]
MAIL_PASSWORD=

# The email address that will receive submitted reports.
[email protected]

# Support email to show on the app
[email protected]

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
@Tataukee
Copy link

I confirm the same issue here .
The site name is not displaying .

@Tataukee
Copy link

Are there any developments underway on this entire project ?

@rfedoruk
Copy link

rfedoruk commented Oct 3, 2023

I think you have to set it in the settings page

@Tataukee
Copy link

Tataukee commented Oct 3, 2023

@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 ?

@rfedoruk
Copy link

rfedoruk commented Oct 3, 2023

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

@Baspla
Copy link

Baspla commented Nov 7, 2023

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.

@FallenAngel666
Copy link

FallenAngel666 commented Dec 8, 2023

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.

@fatfatcocofat
Copy link

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:

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

6 participants