This
Some checks failed
Docker Deploy / build-and-push (push) Failing after 3m3s

This commit is contained in:
Atridad Lahiji 2025-04-24 12:58:25 -06:00
parent 67f29ec389
commit 6194678607
Signed by: atridad
SSH key fingerprint: SHA256:LGomp8Opq0jz+7kbwNcdfTcuaLRb5Nh0k5AchDDb438
4 changed files with 19 additions and 7 deletions

View file

@ -30,6 +30,8 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=registry,ref=${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:buildcache
cache-to: type=registry,ref=${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:buildcache,mode=max
tags: |
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest

View file

@ -4,17 +4,28 @@ WORKDIR /app
COPY . .
# Build the Fresh application
RUN deno task build
# Pre-cache the application dependencies
RUN deno cache main.ts
FROM denoland/deno:alpine
WORKDIR /app
# Copy the Deno cache
COPY --from=builder /deno-dir/ /deno-dir/
# Copy application code including both static directories
COPY --from=builder /app/ /app/
# Ensure static assets directories permissions are set correctly
RUN chmod -R 755 /app/static /app/_fresh/static
ENV DENO_DEPLOYMENT=production
EXPOSE 8000
CMD ["run", "-A", "main.ts"]
# Run with appropriate flags for static file serving
CMD ["run", "--allow-net", "--allow-read", "--allow-env", "main.ts"]

View file

@ -8,6 +8,3 @@ services:
- DENO_DEPLOYMENT=production
ports:
- "3000:8000"
# If you need to persist any data
volumes:
- ./data:/app/data

View file

@ -10,7 +10,7 @@ import * as $index from "./routes/index.tsx";
import * as $post_slug_ from "./routes/post/[slug].tsx";
import * as $posts from "./routes/posts.tsx";
import * as $projects from "./routes/projects.tsx";
import * as $Example from "./islands/Example.tsx";
import type { Manifest } from "$fresh/server.ts";
const manifest = {
@ -24,7 +24,9 @@ const manifest = {
"./routes/posts.tsx": $posts,
"./routes/projects.tsx": $projects,
},
islands: {},
islands: {
"./islands/Example.tsx": $Example,
},
baseUrl: import.meta.url,
} satisfies Manifest;