Compare commits
2
Commits
5676c3e3bb
...
c7e6e3c2d3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7e6e3c2d3 | ||
|
|
417640e75d |
No files matched your search
+2
-1
@@ -2,7 +2,8 @@ _commit: v0.6.0
|
|||||||
_src_path: https://git.kotikot.com/templates/infra.git
|
_src_path: https://git.kotikot.com/templates/infra.git
|
||||||
init_git: true
|
init_git: true
|
||||||
layout: parts
|
layout: parts
|
||||||
mcp_servers: []
|
mcp_servers:
|
||||||
|
- svelte
|
||||||
parts:
|
parts:
|
||||||
- backend
|
- backend
|
||||||
- frontend
|
- frontend
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
config.local.json
|
||||||
|
hook.cache.json
|
||||||
|
hook.pending.json
|
||||||
|
review/
|
||||||
|
decision/
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"svelte": {
|
||||||
|
"type": "http",
|
||||||
|
"url": "https://mcp.svelte.dev/mcp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,12 +8,7 @@ make recreate # the services in COMPOSE_PROFILES
|
|||||||
make check
|
make check
|
||||||
```
|
```
|
||||||
|
|
||||||
<<<<<<< before updating
|
Parts: `backend/`, `frontend/`, each with its own Makefile.
|
||||||
`make env` creates `.env` from the examples of every part and copies each `docker-compose.override.yml.example`. `make recreate` starts the selected profiles, `make rebuild` builds the images first, `make logs`, `make restart` and `make down` do what they say.
|
|
||||||
|
|
||||||
To deploy, `git pull && make deploy`. It runs `make pre-deploy` in every part, which builds images only when their inputs changed and applies migrations, then `docker compose up -d`, then `make post-deploy`, which restarts the services whose mounted code changed. A deploy system with its own `up` step calls the two hooks around it. What was built and started is remembered as `refs/deploy/*` in the clone.
|
|
||||||
|
|
||||||
`make fmt`, `make check` and `make build` run in every part. Part-specific targets live in the part's own Makefile: `make -C backend ...`.
|
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
@@ -56,6 +51,3 @@ Where no service manager runs, in a container for example, `lodge install` says
|
|||||||
The server serves the admin from `frontend/build`. History is drawn as a borehole log: every revision is a bed, newest on top, hatched by the machine that wrote it and labelled with the branch and commit of the main repository. Dragging along the column, or the arrow keys, shows the notes as they were at that revision, and every depth, file and view is a link. A file can be compared with its previous version and put back on the surface; a repository can be deleted with its history, which leaves the files on the machines alone. Machines are listed with their hatch and can be revoked.
|
The server serves the admin from `frontend/build`. History is drawn as a borehole log: every revision is a bed, newest on top, hatched by the machine that wrote it and labelled with the branch and commit of the main repository. Dragging along the column, or the arrow keys, shows the notes as they were at that revision, and every depth, file and view is a link. A file can be compared with its previous version and put back on the surface; a repository can be deleted with its history, which leaves the files on the machines alone. Machines are listed with their hatch and can be revoked.
|
||||||
|
|
||||||
`make -C frontend dev` runs the admin against a server on `localhost:8080`.
|
`make -C frontend dev` runs the admin against a server on `localhost:8080`.
|
||||||
=======
|
|
||||||
Parts: `backend/`, `frontend/`, each with its own Makefile.
|
|
||||||
>>>>>>> after updating
|
|
||||||
+1
-20
@@ -1,15 +1,7 @@
|
|||||||
COMPOSE := cd .. && docker compose
|
COMPOSE := cd .. && docker compose
|
||||||
<<<<<<< before updating
|
|
||||||
IMAGE := lodge/backend
|
|
||||||
LINT := go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
|
LINT := go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
|
||||||
changed = ! git diff --quiet $(1) -- $(2) 2>/dev/null
|
|
||||||
stamp = { git update-ref $(1) HEAD 2>/dev/null || true; }
|
|
||||||
|
|
||||||
.PHONY: fmt check test build pre-deploy post-deploy client dev
|
.PHONY: fmt check test build client dev
|
||||||
=======
|
|
||||||
|
|
||||||
.PHONY: fmt check build
|
|
||||||
>>>>>>> after updating
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
go mod tidy
|
go mod tidy
|
||||||
@@ -24,20 +16,9 @@ test:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
$(COMPOSE) build api
|
$(COMPOSE) build api
|
||||||
<<<<<<< before updating
|
|
||||||
|
|
||||||
pre-deploy:
|
|
||||||
@if $(call changed,refs/deploy/backend,.) || ! docker image inspect $(IMAGE) >/dev/null 2>&1; then \
|
|
||||||
$(MAKE) build && $(call stamp,refs/deploy/backend); \
|
|
||||||
fi
|
|
||||||
|
|
||||||
post-deploy:
|
|
||||||
@:
|
|
||||||
|
|
||||||
client:
|
client:
|
||||||
go build -trimpath -ldflags "-s -w" -o bin/lodge ./cmd/lodge
|
go build -trimpath -ldflags "-s -w" -o bin/lodge ./cmd/lodge
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
LODGE_DB=storage/lodge.db STATIC_DIR=../frontend/build CLIENTS_DIR=bin ADMIN_TOKEN=dev go run ./cmd/lodge-server
|
LODGE_DB=storage/lodge.db STATIC_DIR=../frontend/build CLIENTS_DIR=bin ADMIN_TOKEN=dev go run ./cmd/lodge-server
|
||||||
=======
|
|
||||||
>>>>>>> after updating
|
|
||||||
@@ -16,3 +16,8 @@ node_modules
|
|||||||
# Vite
|
# Vite
|
||||||
vite.config.js.timestamp-*
|
vite.config.js.timestamp-*
|
||||||
vite.config.ts.timestamp-*
|
vite.config.ts.timestamp-*
|
||||||
|
|
||||||
|
# Impeccable
|
||||||
|
**/.impeccable/config.local.json
|
||||||
|
**/.impeccable/hook.cache.json
|
||||||
|
**/.impeccable/hook.pending.json
|
||||||
@@ -2,7 +2,13 @@
|
|||||||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
||||||
"extends": ["ultracite/biome/core", "ultracite/biome/svelte"],
|
"extends": ["ultracite/biome/core", "ultracite/biome/svelte"],
|
||||||
"files": {
|
"files": {
|
||||||
"includes": ["!.claude", "!.svelte-kit", "!build", "!.mcp.json"]
|
"includes": [
|
||||||
|
"!.claude",
|
||||||
|
"!.svelte-kit",
|
||||||
|
"!build",
|
||||||
|
"!.mcp.json",
|
||||||
|
"!.impeccable"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"javascript": { "globals": ["Bun"] },
|
"javascript": { "globals": ["Bun"] },
|
||||||
"overrides": [
|
"overrides": [
|
||||||
|
|||||||
@@ -15,11 +15,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "2.5.13",
|
"@biomejs/biome": "2.5.13",
|
||||||
<<<<<<< before updating
|
|
||||||
"@fontsource-variable/archivo": "^5.3.0",
|
"@fontsource-variable/archivo": "^5.3.0",
|
||||||
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
||||||
=======
|
|
||||||
>>>>>>> after updating
|
|
||||||
"@internationalized/date": "^3.12.0",
|
"@internationalized/date": "^3.12.0",
|
||||||
"@lucide/svelte": "^1.23.0",
|
"@lucide/svelte": "^1.23.0",
|
||||||
"@sveltejs/adapter-static": "^3.0.10",
|
"@sveltejs/adapter-static": "^3.0.10",
|
||||||
@@ -42,11 +39,7 @@
|
|||||||
"tailwindcss": "^4.3.0",
|
"tailwindcss": "^4.3.0",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
"typescript": "^6.0.3",
|
"typescript": "^6.0.3",
|
||||||
<<<<<<< before updating
|
|
||||||
"ultracite": "7.12.4",
|
"ultracite": "7.12.4",
|
||||||
=======
|
|
||||||
"ultracite": "7.12.0",
|
|
||||||
>>>>>>> after updating
|
|
||||||
"vite": "^8.0.16"
|
"vite": "^8.0.16"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
{group === SHARED ? "Shared notes" : `Branch ${spaceName(group)}`}
|
{group === SHARED ? "Shared notes" : `Branch ${spaceName(group)}`}
|
||||||
</h3>
|
</h3>
|
||||||
<ul class="rows">
|
<ul class="rows">
|
||||||
{#each Object.entries(repoState?.spaces[group] ?? {}).sort( ([a], [b]) => a.localeCompare(b) ) as [ file, info ] (file)}
|
{#each Object.entries(repoState?.spaces[group] ?? {}).sort( ([a], [b]) => a.localeCompare(b) ) as [file, info] (file)}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-current={group === space && file === path ? "true" : undefined}
|
aria-current={group === space && file === path ? "true" : undefined}
|
||||||
@@ -414,7 +414,7 @@
|
|||||||
|
|
||||||
{#if entry}
|
{#if entry}
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{#each [["read", "Read"], ["changes", "Changes"], ["source", "Source"]] as [ id, title ] (id)}
|
{#each [["read", "Read"], ["changes", "Changes"], ["source", "Source"]] as [id, title] (id)}
|
||||||
{#if markdown || id !== "read"}
|
{#if markdown || id !== "read"}
|
||||||
<a
|
<a
|
||||||
aria-current={view === id ? "true" : undefined}
|
aria-current={view === id ? "true" : undefined}
|
||||||
|
|||||||
Reference in new issue
Block a user