-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 839 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM denoland/deno:2.1.4
# Install cron
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git
# The port that your application listens to.
EXPOSE 4505
WORKDIR /app
# Prefer not to run as root.
# 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.
COPY src/deps.ts src/deps.ts
RUN deno cache src/deps.ts
# These steps will be re-run upon each file change in your working directory:
ADD src src
ADD config config
# Compile the main app so that it doesn't need to be compiled each startup/entry.
RUN deno cache src/main.ts
CMD ["run", "--allow-net", "--allow-read", "--allow-write", "--allow-run=git", "--allow-env", "src/main.ts"]