Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nktkln/shorturlgenerator
A simple link shortener with registration is made to be parsed in a course of video lessons.
https://github.com/nktkln/shorturlgenerator
docker email-sender gin golang letsencrypt nginx postgresql python redis telegram-bot
Last synced: 5 days ago
JSON representation
A simple link shortener with registration is made to be parsed in a course of video lessons.
- Host: GitHub
- URL: https://github.com/nktkln/shorturlgenerator
- Owner: NKTKLN
- License: mit
- Created: 2021-08-13T06:39:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T23:01:46.000Z (over 2 years ago)
- Last Synced: 2024-11-15T04:16:18.291Z (about 1 month ago)
- Topics: docker, email-sender, gin, golang, letsencrypt, nginx, postgresql, python, redis, telegram-bot
- Language: Go
- Homepage: https://shurl.ml
- Size: 90.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Short URL Generator (shurl.ml)
This is a simple project for understanding how to work with GIN, PostgresSQL and Redis in golang. There is a Russian version of this project on YouTube for more clarification.
Playlist: [click](https://youtube.com/)
## Running this on the server
### Prerequisites
- [Docker CE](https://docs.docker.com/engine/install/)
- [Docker Compose](https://docs.docker.com/compose/install/)### Edit this in the env/app.env
```
VIRTUAL_HOST=yourdomain.com
LETSENCRYPT_HOST=yourdomain.com
[email protected]
```### Edit this in the env/email.env
```
[email protected]
EMAIL_PASSWORD=mysecretpassword
SMTP_ADDRESS=smtp.google.ru
```### Edit this in the env/bot.env
You can get the token for the bot [here](https://t.me/BotFather).
```
API_TOKEN=0123456789:abcdefghijklmnopqrstuvwxyz123456789
BOT_USERNAME=mybotname_bot
```### And then run it with this command
```
docker-compose up -d --build
```## Change the PG administrator's data
### Edit this in the env/pg.env
```
POSTGRES_USER=postgres
POSTGRES_PASSWORD=mysecretpassword
POSTGRES_DB=shorturldb
```And recreate the container if it has already been created, otherwise run it.
#
### Copyright © 2021 [NKTKLN](https://github.com/NKTKLN).