This refactors the data handlers into a more standard/understood model-like architecture, to prepare for a new, more robust config system. It also fixes a problem with creating new Notes and uploading new Photos via the web interface (related to #58). Finally, it speeds up docker builds by sending in less files, which aren't necessary or will be built anyway. This is all in preparation to allow building #13 more robustly.
26 lines
497 B
Docker
26 lines
497 B
Docker
FROM denoland/deno:ubuntu-2.3.3
|
|
|
|
EXPOSE 8000
|
|
|
|
RUN apt-get update && apt-get install -y make
|
|
|
|
WORKDIR /app
|
|
|
|
# These steps will be re-run upon each file change in your working directory:
|
|
ADD . /app
|
|
|
|
RUN rm -fr node_modules _fresh
|
|
|
|
# Build fresh
|
|
RUN deno task build
|
|
|
|
RUN chown -R deno:deno /app /deno-dir
|
|
|
|
# Prefer not to run as root.
|
|
USER deno
|
|
|
|
# Compile the main app so that it doesn't need to be compiled each startup/entry.
|
|
RUN deno cache --reload main.ts
|
|
|
|
CMD ["run", "--allow-all", "main.ts"]
|