FROM denoland/deno:alpine AS builder WORKDIR /app COPY deno.json import_map.json ./ COPY dev.ts main.ts .env* ./ COPY components/ ./components/ COPY islands/ ./islands/ COPY lib/ ./lib/ COPY posts/ ./posts/ COPY routes/ ./routes/ COPY static/ ./static/ COPY utils/ ./utils/ RUN deno cache main.ts FROM denoland/deno:alpine WORKDIR /app COPY --from=builder /deno-dir/ /deno-dir/ COPY --from=builder /app/ /app/ ENV DENO_DEPLOYMENT=production EXPOSE 8000 # Run the server CMD ["run", "-A", "main.ts"]