https://github.com/0xvbetsun/space-trouble
The project represents the configuration and setup server for Space Trouble project
https://github.com/0xvbetsun/space-trouble
docker go golang postgres rest-api
Last synced: 2 months ago
JSON representation
The project represents the configuration and setup server for Space Trouble project
- Host: GitHub
- URL: https://github.com/0xvbetsun/space-trouble
- Owner: 0xvbetsun
- License: mit
- Created: 2022-06-12T10:59:33.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-13T03:11:21.000Z (over 2 years ago)
- Last Synced: 2026-01-14T18:38:24.225Z (6 months ago)
- Topics: docker, go, golang, postgres, rest-api
- Language: Go
- Homepage: https://pkg.go.dev/github.com/vbetsun/space-trouble
- Size: 492 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Space Trouble
The project represents the configuration and setup server for Space Trouble project

[](https://goreportcard.com/report/github.com/vbetsun/space-trouble)

[](https://github.com/vbetsun/space-trouble)
[](https://pkg.go.dev/github.com/vbetsun/space-trouble)
## Structure
The project consists of 2 parts:
- **API** that handles all HTTP communication
- **Monitor** that actualizes information about SpaceX launches from their API
## Prerequisites
- Git
- Docker
- Docker Compose
## How to Install
Clone from github and navigate to the project's folder
```sh
# HTTPS
git clone https://github.com/vbetsun/space-trouble.git
# SSH
git clone git@github.com:vbetsun/space-trouble.git
cd space-trouble
```
## How to Deploy
```sh
cp ./deployments/.env.example ./deployments/.env
```
change env variables for your needs
```dotenv
PORT=8000 # port for serving API
DOCS_PORT=8080 # port for serving OpenAPI documentation
POSTGRES_PORT=5432 # port of postgre db
POSTGRES_HOST=localhost # host of postgre db
POSTGRES_PASSWORD=someStr0ngPass # password to psql
```
and start the application via `docker compose`. It should start the API server, monitor for actualizing data, PostgreSQL database, pgAdmin and OpenAPI documentation, which you can see on http://localhost:${DOCS_PORT}
```sh
docker compose -f ./deployments/docker-compose.yml up -d
```
after that you have to run migrations
```sh
make migrate-up
```
## Database structure

## How to Test
for testing our API we're going to use unit tests and Postman collection via Newman
```sh
make test # runs unit and integration tests
make test-e2e # this command runs e2e tests for running application
```