chore(*): adopt project templates

This commit is contained in:
hh
2026-09-09 01:17:12 +02:00
parent 5ec0212af5
commit ccbc167005
33 changed files with 409 additions and 220 deletions
+5
View File
@@ -0,0 +1,5 @@
node_modules
.svelte-kit
build
.env
.env.*
+2
View File
@@ -0,0 +1,2 @@
PUBLIC_API_BASE_URL=/api
ALLOWED_HOSTS=
+6
View File
@@ -0,0 +1,6 @@
## Checking commands
After writing code, always run from `frontend/`:
```shell
bun fix
bun check
```
+26
View File
@@ -0,0 +1,26 @@
COMPOSE := cd .. && docker compose
changed = ! git diff --quiet $(1) -- $(2) 2>/dev/null
stamp = { git update-ref $(1) HEAD 2>/dev/null || true; }
.PHONY: fmt check build pre-deploy post-deploy dev
fmt:
bun run fix
check:
bun run check
bun run lint
build:
$(COMPOSE) run --rm frontend-dev sh -c "bun install && bun run build"
pre-deploy:
@if $(call changed,refs/deploy/frontend,.) || ! test -d build; then \
$(MAKE) build && $(call stamp,refs/deploy/frontend); \
fi
post-deploy:
@:
dev:
bun run dev
@@ -0,0 +1,11 @@
services:
frontend-dev:
networks:
default: {}
caddy:
aliases:
- beavergram-frontend
networks:
caddy:
external: true
+22
View File
@@ -0,0 +1,22 @@
services:
frontend-dev:
image: oven/bun:alpine
profiles: [frontend-dev]
restart: unless-stopped
working_dir: /app
env_file:
- path: .env
required: false
- path: frontend/.env
required: false
environment:
API_PROXY_TARGET: http://api:8080
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
- frontend_svelte_kit:/app/.svelte-kit
command: [sh, -c, "bun install && bun run dev --host 0.0.0.0 --port 3000"]
volumes:
frontend_node_modules:
frontend_svelte_kit: