This guide covers everything you need to know to run the core-service locally.
-
Environment Variables: Copy the example environment file and configure it.
cp .env.example .env
-
Start Development Environment: Using the provided Makefile, you can spin up the application, database, and bucket storage locally.
make dev
Note: This starts the containers detached and provides an interactive shell for manual executions if needed.
-
Running Locally (without Docker):
go run cmd/main.go
Migrations are handled via golang-migrate.
- Automatic execution is handled on server start if
DB_SHOULD_MIGRATE=true. - To generate a new migration:
make migration service=<service_name> name=<migration_name>
Swagger docs are automatically generated.
- Generate docs locally:
make swaggerorswag init -g cmd/main.go -o ./swagger - Access Swagger UI:
http://localhost:8000/swagger/index.html
scripts/seed_items.sh: Script to seed items with sprites and categories.scripts/reset_items_data.sh: Erase all items/categories from the DB.