- Check main repo for details about the project.
git clone https://github.com/ushiradineth/cron-be
- Check the
.env.example
file for the required environment variables. - Use
cp .env.example .env
to create the.env
file.
- Run
docker compose -f deployments/docker-compose.yml --env-file .env up -d
to start the Postgres Database and Adminer. - Wait for a moment for the database to initialize.
- You can use Adminer, a web-based administration tool included in the setup, to manage your database. Access Adminer at localhost:9090.
- In Adminer, use the following credentials:
- Server: postgres:5432
- Username: cron
- Password: password
- Database: cron
- Run
make db_up
to run the latest Database Migration.
- Note: Make sure the database is the development database
go run cmd/seeder/main.go
go install github.com/mitranim/gow@latest
go run cmd/api/main.go
orgow run cmd/api/main.go
- Run
docker build -t cron-be:go -f deployments/Dockerfile .
to build the image.
- Uncomment the
cron-be
service indocker-compose.yml
. - Run
docker compose -f deployments/docker-compose.yml --env-file .env up -d
to start the Postgres Database, Adminer, and the Cron Go HTTP Server.
go test -v -cover -failfast test ./...