zdravko/justfile

51 lines
1.1 KiB
Makefile
Raw Normal View History

2024-02-10 17:05:11 +00:00
# Always use devbox environment to run commands.
set shell := ["devbox", "run"]
# Load dotenv
set dotenv-load
2024-02-10 17:05:11 +00:00
2024-02-12 08:25:11 +00:00
STATIC_DIR := "./web/static"
2024-02-11 10:56:21 +00:00
# Run full development environment
run:
devbox services up
# Start temporal which is accassible at http://localhost:8233/
run-temporal:
temporal server start-dev
# Start web server accessible at http://localhost:8080/
run-server:
go build -o dist/server cmd/server/main.go
./dist/server
# Run worker
run-worker:
go build -o dist/worker cmd/worker/main.go
./dist/worker
2024-02-11 09:15:00 +00:00
# Deploy the application to fly.io
deploy:
fly deploy
2024-02-11 10:56:21 +00:00
# Start devbox shell
shell:
devbox shell
# Generate and download all external dependencies.
generate:
go generate ./...
_tailwindcss-build:
tailwindcss build -i {{STATIC_DIR}}/css/main.css -o {{STATIC_DIR}}/css/tailwind.css
_htmx-download:
mkdir -p {{STATIC_DIR}}/js
curl -sLo {{STATIC_DIR}}/js/htmx.min.js https://unpkg.com/htmx.org/dist/htmx.min.js
_feather-icons-download:
mkdir -p {{STATIC_DIR}}/icons
curl -sLo {{STATIC_DIR}}/icons/feather-sprite.svg https://unpkg.com/feather-icons/dist/feather-sprite.svg
_generate-gorm:
go run tools/generate/main.go