Here is my solution for pre-assignment. The application was built using:
- Backend: Golang, Go Fiber
- Frontend: SvelteKit, Tailwind CSS
- Database: MongoDB
- DevOps: Docker, NGINX, Ubuntu VPS
Prepare your machine has installed:
- Docker & Docker Compose
You will need to create new directory named mongodb
. Then, it is necessary to creating .env
file for frontend, backend, and database to the following format:
// front/.env
PUBLIC_API_URL=
// back/.env
MONGO_URI=
DB_NAME=
VIOLATION_LIST=
DRONES_API=https://assignments.reaktor.com/birdnest/drones
PILOT_API=https://assignments.reaktor.com/birdnest/pilots
// mongodb/.env
MONGO_INITDB_ROOT_USERNAME=
MONGO_INITDB_ROOT_PASSWORD=
MONGO_INITDB_DATABASE=
You can run the application using the script run-prod
.
sh ./run-prod.sh
To clean the production container, You can use the script clean-prod
.
sh ./clean-prod.sh