Skip to content

Commit 7893d77

Browse files
committed
Add docker file for test
1 parent c44b3f8 commit 7893d77

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

test/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM hayd/alpine-deno:1.0.0
2+
3+
4+
WORKDIR /app
5+
6+
# Prefer not to run as root.
7+
USER deno
8+
9+
# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
10+
# Ideally fetch deps.ts will download and compile _all_ external files used in main.ts.
11+
COPY deps.ts .
12+
RUN deno cache deps.ts
13+
14+
# These steps will be re-run upon each file change in your working directory:
15+
ADD . .
16+
# Compile the main app so that it doesn't need to be compiled each startup/entry.
17+
RUN deno cache main.ts
18+
19+
CMD ["run","--allow-net", "--allow-env", "main.ts"]

test/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: "3.7"
2+
services:
3+
deno:
4+
build: .
5+
image: api-test
6+
ports:
7+
- "3000:3000"
8+
volumes:
9+
- ./:/app

0 commit comments

Comments
 (0)