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

https://github.com/turbaszek/tnijto

Easy to deploy Google Cloud native link shortener 🚀
https://github.com/turbaszek/tnijto

cloudrun gcp golang open-source shorten-urls shortener

Last synced: about 1 year ago
JSON representation

Easy to deploy Google Cloud native link shortener 🚀

Awesome Lists containing this project

README

          

![CI](https://github.com/turbaszek/tnijto/workflows/CI/badge.svg?branch=master)

# TnijTo

Easy to deploy link shortener.

**Table of Contents**

- [Development](#development)
- [Deployment](#deployment)
- [Contributing](#contributing)

## Development

To run the app just do:
```shell
PROJECT_ID="your-project-id" make run
```
where `PROJECT_ID` is the id of Google Cloud project you want to use.

## Deployment

First authenticate using:
```shell
gcloud auth login
```

To deploy TnijTo on Google Cloud you have to enable [Cloud Build](https://cloud.google.com/cloud-build)
and [Cloud Run](https://cloud.google.com/run) services:
```shell
make setup
```
then go to https://console.cloud.google.com/firestore and enable native Firestore mode.

Deploy the image using Cloud Build and deploy using Cloud Run:
```shell
PROJECT_ID="your-project-id" REGION="europe-west1" make deploy
```
where `PROJECT_ID` is the id of Google Cloud project you want to use.

## Contributing

We welcome all contributions! Please submit an issue or PR no matter if it's a bug or a typo.

This project is using [pre-commits](https://pre-commit.com) to ensure the
quality of the code. To install pre-commits just do:
```bash
pip install pre-commit
# or
brew install pre-commit
```
Then from project directory run `pre-commit install`.