2025-01-20 20:40:42 +01:00
|
|
|
# Load the .env file
|
|
|
|
|
ifneq (,$(wildcard ./.env))
|
|
|
|
|
include .env
|
|
|
|
|
export $(shell sed 's/=.*//' .env)
|
|
|
|
|
endif
|
2025-01-11 03:01:40 +01:00
|
|
|
|
2025-01-11 01:44:39 +01:00
|
|
|
go-run:
|
2025-01-20 20:40:42 +01:00
|
|
|
cd src; go run cmd/frontend/main.go;
|
2025-01-11 03:01:40 +01:00
|
|
|
|
2025-01-12 17:36:30 +01:00
|
|
|
migrate-up:
|
2025-03-26 16:40:59 +01:00
|
|
|
goose -dir=./src/migrations/ postgres "postgresql://$(DB_USER):$(DB_PASS)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)" up
|
2025-01-12 17:36:30 +01:00
|
|
|
|
|
|
|
|
migrate-down:
|
2025-03-26 16:40:59 +01:00
|
|
|
goose -dir=./src/migrations/ postgres "postgresql://$(DB_USER):$(DB_PASS)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)" down
|
2025-01-12 17:36:30 +01:00
|
|
|
|
2025-01-11 03:01:40 +01:00
|
|
|
docker-push: docker-build
|
|
|
|
|
docker push git.kohout-dev.de/crowsnest/crowsnest:latest
|
2025-01-11 01:44:39 +01:00
|
|
|
|
|
|
|
|
docker-run: docker-build
|
2025-01-11 03:01:40 +01:00
|
|
|
docker run \
|
|
|
|
|
--env DB_HOST=$(DB_HOST) \
|
|
|
|
|
--env DB_PORT=$(DB_PORT) \
|
|
|
|
|
--env DB_NAME=$(DB_NAME) \
|
|
|
|
|
--env DB_USER=$(DB_USER) \
|
|
|
|
|
--env DB_PASS=$(DB_PASS) \
|
2025-01-20 20:55:03 +01:00
|
|
|
--env OPENAI_API_KEY=$(OPENAI_API_KEY) \
|
2025-01-11 03:01:40 +01:00
|
|
|
--rm -p 8080:8080 git.kohout-dev.de/crowsnest/crowsnest:latest
|
2025-01-11 01:44:39 +01:00
|
|
|
|
|
|
|
|
docker-build:
|
2025-03-26 22:38:39 +01:00
|
|
|
docker build --platform linux/arm64 -t git.kohout-dev.de/crowsnest/crowsnest:latest .
|