Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonka2019/web-docker-slinker
Short-linker (Docker version)
https://github.com/yonka2019/web-docker-slinker
containers docker python server url
Last synced: about 2 months ago
JSON representation
Short-linker (Docker version)
- Host: GitHub
- URL: https://github.com/yonka2019/web-docker-slinker
- Owner: yonka2019
- Created: 2023-01-12T11:43:34.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-24T19:11:54.000Z (over 1 year ago)
- Last Synced: 2024-11-07T15:51:52.528Z (3 months ago)
- Topics: containers, docker, python, server, url
- Language: Python
- Homepage:
- Size: 145 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Short-linker (Docker version)
URL shortener python server. The server have an endpoint that gets the long URL and returns a short URL.In addition, this project deals with:
### SQLite
Local database to save short-links in
### Redis
Cache, to reduce the load. Removes the less recently used keys when the max memory limit (100 MB) is reached
### RabbitMQ
For every new URL, produces a message rabbitmq. Then, the consumer sends mail to server admin## Usage example:
```
x = requests.post('http://127.0.0.1:4321',
json={'url': 'https://thatscool/veryveryverylongurl'})# x = 127.0.0.1:4321/(hashed-shortlink-key)
```- Support for browsing the short URLs. The server redirect the user to the real URL.
## Separated containers (works via Docker Compose):
- Python server container (**web-slink**)
- Database container (**db-slink**)
- Cache container *[redis]* (**cache-slink**)
- Message producer container *[rabbitmq]* (**msg-p-slink**)
- Message consumer container *[rabbitmq]* (**msg-c-slink**)# Preview
![Screenshot preview](https://github.com/yonka2019/web-docker-slinker/blob/master/Screenshots/preview.png)