Kutt
If necessary, install git
sudo apt install git
Clone repo
git clone https://github.com/thedevs-network/kutt.git
cd dans le dossier téléchargé et copier le ficher .env
cp .docker.env .env
Edit .env
nano .env
Il devrait ressembler à ça :
# App port to run on
PORT=3000
# The name of the site where Kutt is hosted
SITE_NAME=Kutt
# The domain that this website is on
DEFAULT_DOMAIN=cut.domain.com
# Generated link length
LINK_LENGTH=6
# Postgres database credential details
DB_HOST=postgres
DB_PORT=5432
DB_NAME=postgres
DB_USER=kutt
DB_PASSWORD=xxxxxxxxxx
DB_SSL=false
# ONLY NEEDED FOR MIGRATION !!1!
# Neo4j database credential details
NEO4J_DB_URI=bolt://localhost
NEO4J_DB_USERNAME=neo4j
NEO4J_DB_PASSWORD=xxxxxxxxx
# Redis host and port
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=xxxxxxx
# Disable registration
DISALLOW_REGISTRATION=false
# 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=xxxxxxxxxxxxxxxxxxxxxxxxx
# Admin emails so they can access admin actions on settings page
# Comma seperated
ADMIN_EMAILS=t@free.fr
# 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=
# Google Analytics tracking ID for universal analytics.
# Example: UA-XXXX-XX
GOOGLE_ANALYTICS=
GOOGLE_ANALYTICS_UNIVERSAL=
# Google Analytics tracking ID for universal analytics
# This one is used for links
# GOOGLE_ANALYTICS_UNIVERSAL=
# 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=ssl0.ovh.net
MAIL_PORT=465
MAIL_SECURE=true
MAIL_USER=contact@s.com
MAIL_FROM=contact@s.com
MAIL_PASSWORD=xxxxxxxx
# The email address that will receive submitted reports.
REPORT_EMAIL=t@free.fr
# Support email to show on the app
CONTACT_EMAIL=contact@s.com
Copy et edit docker-compose.yml
cp docker-compose.yml docker-compose-original.yml
ano docker-compose.yml
version: "3"
services:
kutt:
image: kutt/kutt
depends_on:
- postgres
- redis
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
ports:
- "3000:3000"
env_file:
- .env
environment:
DB_HOST: postgres
DB_NAME: postgres
DB_USER: kutt
DB_PASSWORD: xxxxxxxxxxxxxxxx
REDIS_HOST: redis
restart: unless-stopped
redis:
image: redis:6.0-alpine
volumes:
- redis_data:/data
restart: unless-stopped
postgres:
image: postgres:12-alpine
environment:
POSTGRES_USER: kutt
POSTGRES_PASSWORD: xxxxxxxxxxxxxxxx
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
redis_data:
postgres_data:
docker-compose up -d