Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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).