atri.dad/Dockerfile
Atridad Lahiji 6194678607
Some checks failed
Docker Deploy / build-and-push (push) Failing after 3m3s
This
2025-04-24 12:58:25 -06:00

31 lines
656 B
Docker

FROM denoland/deno:alpine AS builder
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
# Run with appropriate flags for static file serving
CMD ["run", "--allow-net", "--allow-read", "--allow-env", "main.ts"]