Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions docs/latest/deployment/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,30 @@ correctly.
Here is an example `Dockerfile` for a Fresh project:

```dockerfile Dockerfile
FROM denoland/deno:latest

ARG GIT_REVISION
ENV DENO_DEPLOYMENT_ID=${GIT_REVISION}
# Build stage
FROM denoland/deno:latest AS build

WORKDIR /app

COPY . .
RUN deno install --allow-scripts
RUN deno task build

# Runtime stage
FROM denoland/deno:latest AS runtime

ARG GIT_REVISION
ENV DENO_DEPLOYMENT_ID=${GIT_REVISION}

WORKDIR /app

# Copy configuration and compiled production artifacts
COPY --from=build /app/deno.json /app/deno.lock ./
COPY --from=build /app/_fresh ./_fresh

EXPOSE 8000

# You can directly run `deno task start` in most cases
CMD ["deno", "serve", "-A", "_fresh/server.js"]
```

Expand Down