2023-11-18 12:21:38 +00:00
< img src = "wwwroot/img/jsi-logo.png" alt = "" width = "80" / >
2023-04-15 13:40:46 +00:00
# Just Short It (damnit)!
The most KISS single user URL shortener there is.
2024-03-29 18:39:08 +00:00
![](https://img.shields.io/github/license/miawinter98/just-short-it?color=green& style=for-the-badge)
![](https://img.shields.io/github/forks/miawinter98/just-short-it?label=github%20forks& logo=github& style=for-the-badge)
![](https://img.shields.io/github/stars/miawinter98/just-short-it?label=github%20stars& color=yellow& logo=github& style=for-the-badge)
2023-11-17 22:54:07 +00:00
2024-03-29 18:39:08 +00:00
![](https://img.shields.io/docker/pulls/miawinter/just-short-it?color=informational& logo=docker& style=for-the-badge)
![](https://img.shields.io/docker/v/miawinter/just-short-it/latest?logo=docker& label=latest& style=for-the-badge)
![](https://img.shields.io/docker/v/miawinter/just-short-it/latest-alpine?logo=docker& label=latest%20alpine& style=for-the-badge)
2023-04-15 13:40:46 +00:00
## To simply run Just Short It in a container run:
2024-03-29 18:39:08 +00:00
```shell
2023-04-15 13:40:46 +00:00
docker run -e JSI_BaseUrl=< your-url > \
-e JSI_Account__Username=< your-username > \
-e JSI_Account__Password=< your-password > \
2023-11-17 22:36:09 +00:00
-p 80:8080
2023-04-15 14:29:23 +00:00
miawinter/just-short-it:latest
2023-04-15 13:40:46 +00:00
```
## In Docker Compose:
2024-03-29 18:39:08 +00:00
```yaml
2023-04-15 13:40:46 +00:00
version: '3.4'
services:
just-short-it:
container_name: JustShortIt
2023-04-15 14:29:23 +00:00
image: miawinter/just-short-it:latest
2023-11-18 12:12:47 +00:00
ports:
- "80:8080"
2023-04-15 13:40:46 +00:00
environment:
- "JSI_BaseUrl=< your-url > "
- "JSI_Account__Username=< your-username > "
- "JSI_Account__Password=< your-password > "
2024-03-29 20:47:27 +00:00
- "JSI_CUSTOMIZATION__GENERATEDIDLENGTH=6" # optional, range 2 to 16, default: 6
2023-04-15 13:40:46 +00:00
```
## Redis
By default Just Short It saves all the redirects in a in-memory distributed Cache, which get's lost
2023-04-15 18:08:21 +00:00
whenever the container restarts, so if you want to keep your redirects you wanna use redis.
2023-04-15 13:40:46 +00:00
2023-04-15 18:08:21 +00:00
You can configure the connection to redis using the environment variables `JSI_Redis__ConnectionString`
and optional `JSI_Redis__InstanceName` (default is "JustShortIt").
2023-04-15 13:40:46 +00:00
If you want to run both with compose, the most simple setup looks like this:
2024-03-29 18:39:08 +00:00
```yaml
2023-04-15 13:40:46 +00:00
version: '3.4'
services:
just-short-it:
container_name: JustShortIt
2023-04-15 14:29:23 +00:00
image: miawinter/just-short-it:latest
2023-11-17 22:36:09 +00:00
ports:
- "80:8080"
2023-04-15 13:40:46 +00:00
environment:
- "JSI_BaseUrl=< your-url > "
- "JSI_Account__Username=< your-username > "
- "JSI_Account__Password=< your-password > "
- "JSI_Redis__ConnectionString=redis,password=< your-redis-password > "
2023-04-15 14:29:23 +00:00
depends_on:
- redis
2023-04-15 13:40:46 +00:00
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!
2023-04-15 18:08:21 +00:00
# Https
Just Short It! is not supporting Https, I reconmend using a reverse Proxy for hosting
that handles SSL. I can highly reconmend jwilders
[nginx-proxy ](https://github.com/nginx-proxy/nginx-proxy ) togehter with
[acme-companion ](https://github.com/nginx-proxy/acme-companion ),
there is no easier way to get a reverse proxy with automatic certificate renewal.
Here is an Example of how to use Just Short It! togehter with nginx-proxy:
2024-03-29 18:39:08 +00:00
```yaml
2023-04-15 18:08:21 +00:00
version: '3.4'
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 > "
2023-11-17 21:08:03 +00:00
- "VIRTUAL_PORT=8080"
2023-04-15 18:08:21 +00:00
- "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:
```
2023-04-15 13:40:46 +00:00
# License and Attribution
Just Short It by [Mia Winter ](https://miawinter.de/ ) is licensed under the [MIT License ](https://en.wikipedia.org/wiki/MIT_License ).
2023-11-18 12:21:38 +00:00
Just Short It uses [tailwindcss ](https://tailwindcss.com/ ), licensed under the [MIT License ](https://github.com/tailwindlabs/tailwindcss/blob/master/LICENSE )
Just Short It uses [daisyUI ](https://daisyui.com/ ), licensed under the [MIT License ](https://github.com/saadeghi/daisyui/blob/master/LICENSE )
Just Short It uses [PostCSS ](https://postcss.org/ ), licensed under the [MIT License ](https://github.com/postcss/postcss/blob/main/LICENSE )
Just Short It uses [PostCSS CLI ](https://github.com/postcss/postcss-cli/ ), licensed under the [MIT License ](https://github.com/postcss/postcss-cli/blob/master/LICENSE )
Just Short It uses [autoprefixer ](https://github.com/postcss/autoprefixer/ ), licensed under the [MIT License ](https://github.com/postcss/autoprefixer/blob/main/LICENSE )
Just Short It uses [cssnano ](https://cssnano.co/ ), licensed under the [MIT License ](https://github.com/cssnano/cssnano/blob/master/LICENSE-MIT )
2023-11-18 02:20:55 +00:00
Just Short It uses [heroicons ](https://heroicons.com/ ), licensed under the [MIT License ](https://github.com/tailwindlabs/heroicons/blob/master/LICENSE )
2023-04-15 13:40:46 +00:00
2024-01-02 08:31:36 +00:00
Copyright (c) 2024 Mia Winter