https://github.com/bgildson/unico-challenge
This repository contains the solution to the Unico Challenge
https://github.com/bgildson/unico-challenge
api challenge ci cli docker docker-compose go golang postgres remote-containers rest unico unittest
Last synced: about 2 months ago
JSON representation
This repository contains the solution to the Unico Challenge
- Host: GitHub
- URL: https://github.com/bgildson/unico-challenge
- Owner: bgildson
- License: mit
- Created: 2021-07-21T02:27:07.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-07T12:57:33.000Z (almost 5 years ago)
- Last Synced: 2025-10-31T16:06:49.210Z (8 months ago)
- Topics: api, challenge, ci, cli, docker, docker-compose, go, golang, postgres, remote-containers, rest, unico, unittest
- Language: Go
- Homepage:
- Size: 136 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UNICO-CHALLENGE
[](https://github.com/bgildson/unico-challenge/actions/workflows/config.yml)
[](https://coveralls.io/github/bgildson/unico-challenge)
[](https://goreportcard.com/report/github.com/bgildson/unico-challenge)
This repository contains the solution to the [Unico Challenge](./challenge.pdf).
## Running the solution
_To follow the steps bellow, you must have installed [Docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/)._
To run locally as production, execute the command bellow
```sh
docker-compose -f docker-compose-prod.yml up --build
```
Run the command bellow to apply the database migrations
```sh
docker run --rm -v $(pwd)/migrations:/migrations --network host migrate/migrate:v4.11.0 -path=/migrations -database "postgres://postgres:postgres@localhost:5432/unico_challenge?sslmode=disable" -verbose up
```
Run the command bellow to import the registers from the file [DEINFO_AB_FEIRASLIVRES_2014.csv](./DEINFO_AB_FEIRASLIVRES_2014.csv)
```sh
docker-compose -f docker-compose-prod.yml exec app /unico-challenge import -f /app/DEINFO_AB_FEIRASLIVRES_2014.csv
```
The file "[unico-challenge.postman_collection.json](./unico-challenge.postman_collection.json)" contains a **Postman Collection** to interact with the challenge solution.