f1monkey
F1monkey backend monorepo
Services
auth - Auth microservice
Local deployment
- Copy
docker-compose.override.yml.dist
todocker-compose.override.yml
cp docker-compose.override.yml.dist docker-compose.override.yml
- Run docker containers
$ ./scripts/docker-start.sh
- Connect to the go container
$ docker-compose exec go bash
- Generate RSA key pair to sign JWT tokens
$ openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096
$ openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -pubout
- Add private key passphrase to .env.local
$ printf "\nJWT_PASSPHRASE=passphrase" >> .env.local
Development
- Attach VS Code to the container using Remote Containers
- Ctrl+Shift+P
- Select
Remote-Containers: Attach to Running Container
comand - Choose the container from the list
Makefile
%app%
- one of the following services:
Building
Run the following command to build the application
$ make build %app%
Run the following command to build an run the application
$ make run %app%
Testing
Run tests:
$ make test
Docs
Regenerate API documentation
Run command to regenerate API documentation:
$ make docs