URL Shortener API Service
self-hostable open-source URL shortening web API service with a Fast API. It allows you to host your own URL shorten easy to use.
Urless is written in Python, using Redis as its primary database.( TODO redisgears + mysql)
Download the latest version of URLess via this image 'alivx/urless'.
docker-compose build #To build project
docker-compose up #To run project, You can use `-d` option to run it in the background.To test service run CURL command:
curl --location --request POST 'http://127.0.0.1:8000/' \
--header 'Content-Type: application/json' \
--data-raw '{"url":"www.google.com"}'OR
from browser open localhost and start testing the system.
To Deal with config for each app, you have two method.
- settings.yaml
- enviromnet varables. (This will override settings.yaml value)
In point 2, just use DYNACONF_[valueName], for example, in our API there is a config called exposePort, to override it use this value DYNACONF_exposePort. such as export DYNACONF_exposePort=1991
If you want to use a custom config under docker-compose, just add it under environment section as explained above.
You can change value for each service config under file settings.yaml
For nginx, you must change the config file under infrastructure/nginx/urless.conf if you changes frontend container name or port.