Does this work?
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
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"]
|
Reference in New Issue
Block a user