FROM denoland/deno:2.0.3
# set DENO_DIR to avoid conflicts with google cloud
ENV DENO_DIR=./.deno_cache
ENV NODE_ENV=production
WORKDIR /app
# Prefer not to run as root.
USER deno
COPY deno.json .
COPY deno.lock .
RUN deno install
# These steps will be re-run upon each file change in your working directory:
COPY . .
# Compile the main app so that it doesn't need to be compiled each startup/entry.
RUN deno cache src/index.ts
ENV PORT=8080
EXPOSE $PORT
CMD ["run", "--allow-all", "src/index.ts"]
FROM denoland/deno:2.0.3
# set DENO_DIR to avoid conflicts with google cloud
ENV DENO_DIR=./.deno_cache
ENV NODE_ENV=production
WORKDIR /app
# Prefer not to run as root.
USER deno
COPY deno.json .
COPY deno.lock .
RUN deno install
# These steps will be re-run upon each file change in your working directory:
COPY . .
# Compile the main app so that it doesn't need to be compiled each startup/entry.
RUN deno cache src/index.ts
ENV PORT=8080
EXPOSE $PORT
CMD ["run", "--allow-all", "src/index.ts"]