···11+# drizzle-kit is in jail because it does not support deno @std/dotenv
22+FROM node:latest
33+44+RUN adduser jail
55+66+USER jail
77+WORKDIR /home/jail
88+99+RUN npm init -y
1010+RUN npm i drizzle-kit drizzle-orm @libsql/client
1111+1212+COPY drizzle.config.ts.jail drizzle.config.ts
1313+COPY build/schema src/db/schema
+53
server/jail/drizzle-kit/Makefile
···11+# --- Configuration ---
22+# Set the name for your image and the running container
33+IMAGE_NAME := drizzle-kit
44+CONTAINER_NAME := i-drizzle-kit
55+66+HOST_DIR := $(shell pwd)/build
77+CONTAINER_HOME := /home/jail
88+CONTAINER_DIR := $(CONTAINER_HOME)/build
99+DATA_MOUNT := $(HOST_DIR):$(CONTAINER_DIR):z
1010+1111+GEN_EXEC := $(CONTAINER_HOME)/node_modules/.bin/drizzle-kit generate
1212+PUSH_EXEC := $(CONTAINER_HOME)/node_modules/.bin/drizzle-kit push
1313+1414+# --- Main Targets ---
1515+1616+# Build the container image (DEFAULT target)
1717+# Run 'make' or 'make build'
1818+build: Containerfile
1919+ @mkdir -p build
2020+ @cp -r ../../src/db/schema build/
2121+ @podman build -q -t $(IMAGE_NAME) . > /dev/null
2222+2323+# Run 'make run'
2424+gen: build clean
2525+ @podman run --rm -v $(DATA_MOUNT) --name $(CONTAINER_NAME) $(IMAGE_NAME) $(GEN_EXEC)
2626+2727+# Run 'make run'
2828+push: build clean
2929+ @podman run --rm -v $(DATA_MOUNT) --name $(CONTAINER_NAME) $(IMAGE_NAME) $(PUSH_EXEC)
3030+3131+# Inspect: Run the container with an interactive shell
3232+# Run 'make inspect'
3333+inspect: build clean
3434+ @podman run -it --rm -v $(DATA_MOUNT) --name $(CONTAINER_NAME) $(IMAGE_NAME) /bin/sh
3535+3636+# Force a rebuild and then run
3737+force-rebuild: clean
3838+ @podman build --no-cache -t $(IMAGE_NAME) .
3939+ @make run
4040+4141+# --- Utility Targets ---
4242+4343+# Stop and remove the container (alias for 'clean')
4444+stop: clean
4545+4646+# Clean up any potentially leftover container instance
4747+# The '|| true' ignores errors if the container doesn't exist
4848+clean:
4949+ @podman stop $(CONTAINER_NAME) >/dev/null 2>&1 || true
5050+ @podman rm $(CONTAINER_NAME) >/dev/null 2>&1 || true
5151+5252+# Add a .PHONY target to prevent 'make' from confusing targets with file names
5353+.PHONY: build run inspect force-rebuild stop clean
+2-2
server/runtimes/dev.ts
···11+import openapiConfig from '@/openapi.config.ts'
22+import { PhotoAPI } from '@/src/app.ts'
13import type { AppBindings } from '@/types.ts'
24import { OpenAPIHono } from '@hono/zod-openapi'
35import { Scalar } from '@scalar/hono-api-reference'
···57import pino from 'pino'
68import pretty from 'pino-pretty'
79import defaultHook from 'stoker/openapi/default-hook'
88-import openapiConfig from '@/openapi.config.ts'
99-import { PhotoAPI } from '@/src/common/app.ts'
10101111function devTools(app: OpenAPIHono<AppBindings>) {
1212 app.use(pinoLogger({