24 lines
630 B
Text
24 lines
630 B
Text
|
FROM denoland/deno:latest
|
||
|
|
||
|
EXPOSE 8000
|
||
|
WORKDIR /app
|
||
|
|
||
|
# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
|
||
|
# Ideally cache deps.ts will download and compile _all_ external files used in main.ts.
|
||
|
ADD handlers /app/handlers
|
||
|
COPY server.ts /app
|
||
|
COPY serverus.ts /app
|
||
|
COPY deno.json /app
|
||
|
COPY deno.lock /app
|
||
|
COPY README.md /app
|
||
|
|
||
|
RUN deno install --frozen
|
||
|
|
||
|
USER deno
|
||
|
|
||
|
ENV ROOT=/www
|
||
|
ENV TRACE_ERROR_RESPONSES=true
|
||
|
ENV SERVERUS_TYPESCRIPT_IMPORT_LOGGING=true
|
||
|
|
||
|
CMD ["sh", "-c", "deno --allow-env --allow-read --allow-write --allow-net /app/serverus.ts --hostname 0.0.0.0 --root ${ROOT}"]
|