turned base into kuttit
This commit is contained in:
parent
5ed1af1f7f
commit
ce7288da04
@ -1,2 +1 @@
|
|||||||
# Base App Deployment
|
# KuttIt Deployment
|
||||||
This is the base on which (almost) every deployment is sort-of-based on.
|
|
||||||
|
@ -1,7 +1,42 @@
|
|||||||
---
|
---
|
||||||
services:
|
services:
|
||||||
app:
|
kuttit:
|
||||||
|
image: kutt/kutt:${KUTTIT_VERSION}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
environment:
|
||||||
|
- PORT=${TRAEFIK_SERVICE_PORT}
|
||||||
|
- SITE_NAME=${KUTTIT_NAME}
|
||||||
|
- DEFAULT_DOMAIN=${KUTTIT_DOMAIN}
|
||||||
|
- LINK_LENGTH=${KUTTIT_LINK_LENGTH}
|
||||||
|
- DB_HOST=postgres
|
||||||
|
- DB_PORT=5432
|
||||||
|
- DB_NAME=${POSTGRES_NAME}
|
||||||
|
- DB_USER=${POSTGRES_USER}
|
||||||
|
- DB_PASSWORD=${POSTGRES_PASS}
|
||||||
|
- DB_SSL=false
|
||||||
|
- REDIS_HOST=redis
|
||||||
|
- REDIS_PORT=6379
|
||||||
|
- REDIS_PASSWORD=${REDIS_PASS}
|
||||||
|
- DISALLOW_REGISTRATION=${KUTTIT_DISABLE_REGISTRATION}
|
||||||
|
- DISALLOW_ANONYMOUS_LINKS=${KUTTIT_DISABLE_ANONYMOUS}
|
||||||
|
- USER_LIMIT_PER_DAY=${KUTTIT_DAILY_USER_LIMIT}
|
||||||
|
- NON_USER_COOLDOWN=${KUTTIT_NON_USER_COOLDOWN}
|
||||||
|
- DEFAULT_MAX_STATS_PER_LINK=${KUTTIT_LINK_STATS}
|
||||||
|
- CUSTOM_DOMAIN_USE_HTTPS=${KUTTIT_DOMAIN_HTTPS}
|
||||||
|
- JWT_SECRET=${KUTTIT_JWT_SECRET}
|
||||||
|
- ADMIN_EMAILS=${KUTTIT_ADMIN_EMAILS}
|
||||||
|
- MAIL_HOST=${KUTTIT_MAIL_HOST}
|
||||||
|
- MAIL_PORT=${KUTTIT_MAIL_PORT}
|
||||||
|
- MAIL_FROM=${KUTTIT_MAIL_FROM}
|
||||||
|
- MAIL_USER=${KUTTIT_MAIL_USER}
|
||||||
|
- MAIL_PASSWORD=${KUTTIT_MAIL_PASS}
|
||||||
|
- MAIL_SECURE=${KUTTIT_MAIL_SECURE}
|
||||||
|
- REPORT_EMAIL=${KUTTIT_REPORT_EMAIL}
|
||||||
|
- CONTACT_EMAIL=${KUTTIT_CONTACT_EMAIL}
|
||||||
labels:
|
labels:
|
||||||
### Section Træfik
|
### Section Træfik
|
||||||
- traefik.enable=${TRAEFIK_ENABLED}
|
- traefik.enable=${TRAEFIK_ENABLED}
|
||||||
@ -22,15 +57,54 @@ services:
|
|||||||
# specify a service so a custom port can be used
|
# specify a service so a custom port can be used
|
||||||
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
|
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
|
||||||
### Section Diun
|
### Section Diun
|
||||||
- diun.enable=${DIUN_ENABLE}
|
- diun.enable=${DIUN_KUTTIT_ENABLE}
|
||||||
- diun.watch_repo=${DIUN_WATCHREPO}
|
- diun.watch_repo=${DIUN_KUTTIT_WATCHREPO}
|
||||||
- diun.sort_tags=${DIUN_SORTALGO}
|
- diun.sort_tags=${DIUN_KUTTIT_SORTALGO}
|
||||||
- diun.include_tags=${DIUN_INCLUDE}
|
- diun.include_tags=${DIUN_KUTTIT_INCLUDE}
|
||||||
- diun.exclude_tags=${DIUN_EXCLUDE}
|
- diun.exclude_tags=${DIUN_KUTTIT_EXCLUDE}
|
||||||
networks:
|
networks:
|
||||||
|
- internal
|
||||||
- traefik
|
- traefik
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:${REDIS_VERSION}
|
||||||
|
restart: unless-stopped
|
||||||
|
command: --requirepass ${REDIS_PASS}
|
||||||
|
environment:
|
||||||
|
- REDIS_PASS=${REDIS_PASS}
|
||||||
|
labels:
|
||||||
|
### Section Diun
|
||||||
|
- diun.enable=${DIUN_REDIS_ENABLE}
|
||||||
|
- diun.watch_repo=${DIUN_REDIS_WATCHREPO}
|
||||||
|
- diun.sort_tags=${DIUN_REDIS_SORTALGO}
|
||||||
|
- diun.include_tags=${DIUN_REDIS_INCLUDE}
|
||||||
|
- diun.exclude_tags=${DIUN_REDIS_EXCLUDE}
|
||||||
networks:
|
networks:
|
||||||
|
- internal
|
||||||
|
volumes:
|
||||||
|
- ${REDIS_DATA}:/data
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:${POSTGRES_VERSION}
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=${POSTGRES_NAME}
|
||||||
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASS}
|
||||||
|
labels:
|
||||||
|
### Section Diun
|
||||||
|
- diun.enable=${DIUN_POSTGRES_ENABLE}
|
||||||
|
- diun.watch_repo=${DIUN_POSTGRES_WATCHREPO}
|
||||||
|
- diun.sort_tags=${DIUN_POSTGRES_SORTALGO}
|
||||||
|
- diun.include_tags=${DIUN_POSTGRES_INCLUDE}
|
||||||
|
- diun.exclude_tags=${DIUN_POSTGRES_EXCLUDE}
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
volumes:
|
||||||
|
- ${POSTGRES_DATA}:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal:
|
||||||
traefik:
|
traefik:
|
||||||
external: true
|
external: true
|
||||||
name: ${TRAEFIK_NETWORK}
|
name: ${TRAEFIK_NETWORK}
|
||||||
|
62
env.example
62
env.example
@ -1,18 +1,62 @@
|
|||||||
# Træfik
|
# Træfik
|
||||||
TRAEFIK_ENABLED=true
|
TRAEFIK_ENABLED=true
|
||||||
TRAEFIK_NETWORK=traefik
|
TRAEFIK_NETWORK=traefik
|
||||||
TRAEFIK_ROUTER=app_example_com
|
TRAEFIK_ROUTER=kuttit_example_com
|
||||||
TRAEFIK_SERVICE=app_example_com
|
TRAEFIK_SERVICE=kuttit_example_com
|
||||||
TRAEFIK_SERVICE_PORT=80
|
TRAEFIK_SERVICE_PORT=3000
|
||||||
TRAEFIK_MATCHRULE=Host(`app.example.com`)
|
TRAEFIK_MATCHRULE=Host(`kuttit.example.com`)
|
||||||
TRAEFIK_TLSENABLED=true
|
TRAEFIK_TLSENABLED=true
|
||||||
TRAEFIK_CERTRESOLVER=letsencrypt
|
TRAEFIK_CERTRESOLVER=letsencrypt
|
||||||
TRAEFIK_HTTP_MIDDLEWARES=http-to-https
|
TRAEFIK_HTTP_MIDDLEWARES=http-to-https
|
||||||
TRAEFIK_HTTPS_MIDDLEWARES=hsts
|
TRAEFIK_HTTPS_MIDDLEWARES=hsts
|
||||||
|
|
||||||
# Diun
|
# Diun
|
||||||
DIUN_ENABLE=true
|
DIUN_KUTTIT_ENABLE=true
|
||||||
DIUN_WATCHREPO=true
|
DIUN_KUTTIT_WATCHREPO=true
|
||||||
DIUN_SORTALGO=semver
|
DIUN_KUTTIT_SORTALGO=semver
|
||||||
DIUN_INCLUDE=
|
DIUN_KUTTIT_INCLUDE=v[0-9]\.[0-9]\.[0-9]
|
||||||
DIUN_EXCLUDE=
|
DIUN_KUTTIT_EXCLUDE=latest,develop
|
||||||
|
DIUN_REDIS_ENABLE=true
|
||||||
|
DIUN_REDIS_WATCHREPO=true
|
||||||
|
DIUN_REDIS_SORTALGO=semver
|
||||||
|
DIUN_REDIS_INCLUDE=[0-9]\.[0-9]\.[0-9]-alpine[0-9]\.[0-9]
|
||||||
|
DIUN_REDIS_EXCLUDE=latest
|
||||||
|
DIUN_POSTGRES_ENABLE=true
|
||||||
|
DIUN_POSTGRES_WATCHREPO=true
|
||||||
|
DIUN_POSTGRES_SORTALGO=semver
|
||||||
|
DIUN_POSTGRES_INCLUDE=[0-9]\.[0-9]-alpine[0-9]\.[0-9]
|
||||||
|
DIUN_POSTGRES_EXCLUDE=latest
|
||||||
|
|
||||||
|
# KuttIt
|
||||||
|
KUTTIT_VERSION=v2.7.4
|
||||||
|
KUTTIT_NAME=kuttit
|
||||||
|
KUTTIT_DOMAIN=kuttit.example.com
|
||||||
|
KUTTIT_LINK_LENGTH=6
|
||||||
|
KUTTIT_DISABLE_REGISTRATION=true
|
||||||
|
KUTTIT_DISABLE_ANONYMOUS=true
|
||||||
|
KUTTIT_DAILY_USER_LIMIT=50
|
||||||
|
KUTTIT_NON_USER_COOLDOWN=0
|
||||||
|
KUTTIT_LINK_STATS=5000
|
||||||
|
KUTTIT_DOMAIN_HTTPS=true
|
||||||
|
KUTTIT_JWT_SECRET=changeme
|
||||||
|
KUTTIT_ADMIN_EMAILS=admin@example.com
|
||||||
|
KUTTIT_MAIL_HOST=mail.example.com
|
||||||
|
KUTTIT_MAIL_PORT=465
|
||||||
|
KUTTIT_MAIL_FROM="Kutt.it <kuttit@example.com>"
|
||||||
|
KUTTIT_MAIL_USER=kuttit@example.com
|
||||||
|
KUTTIT_MAIL_PASS=changeme
|
||||||
|
KUTTIT_MAIL_SECURE=true
|
||||||
|
KUTTIT_REPORT_EMAIL=admin@example.com
|
||||||
|
KUTTIT_CONTACT_EMAIL=info@example.com
|
||||||
|
|
||||||
|
# Redis
|
||||||
|
REDIS_VERSION=7.0.4-alpine3.16
|
||||||
|
REDIS_DATA=./data/postgres
|
||||||
|
REDIS_PASS=changeme
|
||||||
|
|
||||||
|
# Postgres
|
||||||
|
POSTGRES_VERSION=14.5-alpine3.16
|
||||||
|
POSTGRES_DATA=./data/postgres
|
||||||
|
POSTGRES_NAME=kuttit
|
||||||
|
POSTGRES_USER=kuttit
|
||||||
|
POSTGRES_PASS=changeme
|
||||||
|
Loading…
Reference in New Issue
Block a user