ProductPromotion
Logo

Open.Source

made by https://0x3d.site

GitHub - miawinter98/just-short-it: Just Short It (damnit)! The most KISS single-user URL shortener there is.
Just Short It (damnit)! The most KISS single-user URL shortener there is.  - GitHub - miawinter98/just-short-it: Just Short It (damnit)! The most KISS single-user URL shortener there is.
Visit Site

GitHub - miawinter98/just-short-it: Just Short It (damnit)! The most KISS single-user URL shortener there is.

GitHub - miawinter98/just-short-it: Just Short It (damnit)! The most KISS single-user URL shortener there is.

Just Short It (damnit)!

The most KISS single user URL shortener there is.

To simply run Just Short It in a container run:

docker run -e JSI_BaseUrl=<your-url> \
           -e JSI_Account__Username=<your-username> \
           -e JSI_Account__Password=<your-password> \
           -p 80:8080 \
           miawinter/just-short-it:latest

In Docker Compose:

services:
  just-short-it:
    container_name: JustShortIt
    image: miawinter/just-short-it:latest
    ports:
      - "80:8080"
    environment:
      - "JSI_BaseUrl=<your-url>"
      - "JSI_Account__Username=<your-username>"
      - "JSI_Account__Password=<your-password>"
      - "JSI_CUSTOMIZATION__GENERATEDIDLENGTH=6" # optional, range 2 to 16, default: 6

Redis

By default Just Short It saves all the redirects in a in-memory distributed Cache, which get's lost whenever the container restarts, so if you want to keep your redirects you wanna use redis.

You can configure the connection to redis using the environment variables JSI_Redis__ConnectionString and optional JSI_Redis__InstanceName (default is "JustShortIt").

If you want to run both with compose, the most simple setup looks like this:

services:
  just-short-it:
    container_name: JustShortIt
    image: miawinter/just-short-it:latest
    ports:
      - "80:8080"
    environment:
      - "JSI_BaseUrl=<your-url>"
      - "JSI_Account__Username=<your-username>"
      - "JSI_Account__Password=<your-password>"
      - "JSI_Redis__ConnectionString=redis,password=<your-redis-password>"
    depends_on:
      - redis
  redis:
    container_name: Redis
    image: redis:alpine
    environment:
      - "REDIS_PASSWORD=<your-redis-password>"
    volumes:
      - redis:/data

volumes:
  redis:

There you go, now your urls survive a restart!

Https

Just Short It! is not supporting Https, I reconmend using a reverse Proxy for hosting that handles SSL. I personally have experience with two types of reverse proxies here: caddy and nginx-proxy.

Caddy

The easiest way to get https with a reverse proxy is Caddy.

services:
  # Just Short It 
  just-short-it:
    container_name: JustShortIt
    image: miawinter/just-short-it:latest
    environment:
      - "JSI_BaseUrl=<your-url>"
      - "JSI_Account__Username=<your-username>"
      - "JSI_Account__Password=<your-password>"
      - "JSI_Redis__ConnectionString=redis,password=<your-redis-password>"
    depends_on:
      - redis
  redis:
    container_name: Redis
    image: redis:alpine
    environment:
      - "REDIS_PASSWORD=<your-redis-password>"
    volumes:
      - redis:/data
  caddy:
    container_name: Caddy
    image: caddy:latest
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - caddy_sites: /sites
      - caddy_data: /data
      - caddy_config:/config
      - ./Caddyfile:/etc/caddy/Caddyfile

volumes:
  redis:
  caddy_sites:
  caddy_data:
  caddy_config:

Then you need a Caddyfile:

<your_domain> {
  tls <your-email>
  reverse_proxy JustShortIt:8080
}

The tls property is the email used for let's encrypt, there you would be notified if a certificate is about to expire (which won't happen as long as caddy is running, because it automatically requests new ones before they do).
The domain should only be [subdomain?].[domain].[tls], if you prefix it with http or https caddy will only support that, but without this caddy responds to both and will automatically redirect from http to https, as well as take care of the https certificates.

nginx-prodxy

jwilders nginx-proxy togehter with acme-companion.

Here is an Example of how to use Just Short It! togehter with nginx-proxy:

services:
  # Just Short It
  just-short-it:
    container_name: JustShortIt
    image: miawinter/just-short-it:latest
    environment:
      - "JSI_BaseUrl=<your-url>"
      - "JSI_Account__Username=<your-username>"
      - "JSI_Account__Password=<your-password>"
      - "JSI_Redis__ConnectionString=redis,password=<your-redis-password>"
    environment:
      - "VIRTUAL_HOST=<your-url>"
      - "VIRTUAL_PORT=8080"
      - "LETSENCRYPT_HOST=<your-url>"
    depends_on:
      - redis
      - acme-companion
  redis:
    container_name: Redis
    image: redis:alpine
    environment:
      - "REDIS_PASSWORD=<your-redis-password>"
    volumes:
      - redis:/data

  # nginx-proxy with acme-companion
  nginx-proxy:
    container_name: nginx-proxy
    restart: unless-stopped
    image: jwilder/nginx-proxy:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - certs:/etc/nginx/certs:ro
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
    environment:
      - "DHPARAM_GENERATION=false" # Not sure you need this actually
      - "DISABLE_ACCESS_LOGS" # Always nice to comply with GDPR
  acme-companion:
    container_name: acme-companion
    restart: unless-stopped
    image: nginxproxy/acme-companion
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - certs:/etc/nginx/certs:rw
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /etc/acme.sh:/etc/acme.sh
    environment:
      - "DEFAULT_EMAIL=<your-email>"
      - "NGINX_PROXY_CONTAINER=nginx-proxy"
    depends_on:
      - nginx

volumes:
  # Just Short It!
  redis:
  # Proxy
  certs:
  conf:
  vhost:
  html:

License and Attribution

Just Short It by Mia Winter is licensed under the MIT License.

Just Short It uses tailwindcss, licensed under the MIT License
Just Short It uses daisyUI, licensed under the MIT License
Just Short It uses PostCSS, licensed under the MIT License
Just Short It uses PostCSS CLI, licensed under the MIT License
Just Short It uses autoprefixer, licensed under the MIT License
Just Short It uses cssnano, licensed under the MIT License
Just Short It uses heroicons, licensed under the MIT License

Copyright (c) 2024 Mia Winter

Articles
to learn more about the open-source concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Open-Source.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory