- Add storage_enabled and storage_limit_mb columns to static_sites.
- Create/attach Docker volumes (tinyforge-site-{name}-data) for Deno
sites with storage enabled, mounted at /app/data.
- Grant --allow-write=/app/data in Deno container CMD.
- Add storage usage API endpoint (GET /api/sites/{id}/storage).
- Show storage section in site detail page with usage bar.
- Add storage toggle and limit field to new site wizard.
- Use ConfirmDialog for secret deletion instead of inline delete.
This commit is contained in:
@@ -231,15 +231,19 @@ COPY public/ /app/public/
|
||||
COPY api/ /app/api/
|
||||
COPY router.ts /app/router.ts
|
||||
|
||||
# Create data directory for persistent storage (mounted as volume when enabled).
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
# Cache dependencies.
|
||||
RUN deno install --entrypoint router.ts
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["deno", "run", "--allow-net", "--allow-read", "--allow-env", "router.ts"]
|
||||
CMD ["deno", "run", "--allow-net", "--allow-read", "--allow-write=/app/data", "--allow-env", "router.ts"]
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
// GenerateStaticDockerfile generates a minimal nginx Dockerfile for pure static sites.
|
||||
func GenerateStaticDockerfile() string {
|
||||
return `FROM nginx:alpine
|
||||
|
||||
Reference in New Issue
Block a user