A webapp that shortens URLs but for a limited time
https://temporary-shortner.herokuapp.com/
docker build -t tshort .
docker run -d --name tshort -p{PORT}:80 -e REDIS_URL="{REDIS_URL" -e APP_BASE_URL="{BASE_URL}" tshort
- Rename
docker-compose.yml.example
todocker-compose.yml
- Modify
docker-compose.yml
to reflect your configuration - Run
docker-compose up -d
- Create a python virtualenv (At least python 3.9)
- Install dependencies with
pip install -r requirements.txt
- Run uvicorn
python -m uvicorn app.main:app --host 0.0.0.0 --port 8080 --reload
The folowing enviroments variable configure the app
Variable | Default | Description |
---|---|---|
APP_BASE_URL | http://localhost:5000 | Url base for the shortened link |
REDIS_URL | redis://localhost | Url for Redis |
EXPIRATION_TIME | 604800 | Time that link expires in redis(Default 7 days) |
You can make a fork and submit Pull Requests with new features, report issues or Buy me a ☕