This
This commit is contained in:
13
Dockerfile
13
Dockerfile
@ -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"]
|
||||
|
Reference in New Issue
Block a user