feature: add Dockerfile
This commit is contained in:
parent
013e30264f
commit
bc373f7367
2 changed files with 23 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM denoland/deno:latest
|
||||
|
||||
EXPOSE 8000
|
||||
USER deno
|
||||
|
||||
# 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 models /app/models
|
||||
ADD public /app/public
|
||||
ADD utils /app/utils
|
||||
COPY deno.json /app
|
||||
COPY deno.lock /app
|
||||
COPY README.md /app
|
||||
|
||||
RUN deno install
|
||||
|
||||
ENV FSDB_ROOT=/.fsdb
|
||||
ENV TRACE_ERROR_RESPONSES=true
|
||||
ENV SERVERUS_TYPESCRIPT_IMPORT_LOGGING=true
|
||||
ENV APP_ROOT=/app/public
|
||||
|
||||
CMD ["sh", "-c", "deno --allow-env --allow-read --allow-write --allow-net jsr:@andyburke/serverus --root ${APP_ROOT}"]
|
Loading…
Add table
Add a link
Reference in a new issue