- Check frontend repository for details about the project.
git clone https://github.com/ushiradineth/cron-be
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
go install github.com/swaggo/swag/cmd/swag@latest
go install github.com/mitranim/gow@latest
- 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
ormake db_seed
go run cmd/api/main.go
ormake run
gow run cmd/api/main.go
ormake run_watch
- Run
docker build -t cron-be:go -f deployments/Dockerfile .
ormake build_image
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
ormake compose_up
to start the Postgres Database, Adminer, and the Cron Go HTTP Server.
go test -v -cover -failfast test ./...
ormake test