Skip to content

Commit ac4be60

Browse files
Deno
1 parent aed19d2 commit ac4be60

19 files changed

+302
-758
lines changed

.github/workflows/spm.yml

-23
This file was deleted.

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

-7
This file was deleted.

.vscode/launch.json

-22
This file was deleted.

.vscode/settings.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2-
"lldb.library": "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB",
3-
"lldb.launch.expressions": "native"
2+
"deno.enable": true,
3+
"deno.lint": true,
4+
"deno.unstable": true,
5+
"editor.formatOnSave": true,
6+
"[typescript]": {
7+
"editor.defaultFormatter": "denoland.vscode-deno"
8+
}
49
}

Dockerfile

+8-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
FROM swift:5.9-focal as build
1+
FROM denoland/deno:ubuntu-1.38.4
22

3-
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
4-
&& apt-get -q update && apt-get -q dist-upgrade -y \
5-
&& apt-get install -y --no-install-recommends libsqlite3-dev \
6-
&& rm -rf /var/lib/apt/lists/*
7-
8-
WORKDIR /build
9-
COPY ./Package.* ./
10-
RUN swift package resolve
11-
COPY . .
12-
RUN swift build -c release
13-
14-
WORKDIR /staging
15-
RUN cp "$(swift build --package-path /build -c release --show-bin-path)/Run" ./ \
16-
&& mv /build/Resources ./Resources && chmod -R a-w ./Resources
3+
EXPOSE 8080
174

18-
FROM swift:5.9-focal-slim
5+
WORKDIR /app
196

207
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
218
&& apt-get -q update && apt-get -q dist-upgrade -y \
@@ -28,10 +15,10 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
2815
&& apt-get update && apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io \
2916
&& rm -r /var/lib/apt/lists/*
3017

31-
WORKDIR /app
32-
COPY --from=build /staging /app
18+
COPY deps.ts .
19+
RUN deno cache deps.ts
3320

34-
EXPOSE 8080
21+
COPY . .
22+
RUN deno cache main.ts
3523

36-
ENTRYPOINT ["./Run"]
37-
CMD ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]
24+
CMD ["run", "--allow-net", "--allow-run", "main.ts"]

Package.resolved

-185
This file was deleted.

Package.swift

-24
This file was deleted.

Resources/Sandbox/faketty.sh

-8
This file was deleted.

Resources/Sandbox/run.sh

-13
This file was deleted.

Resources/Sandbox/sandbox.sh

-28
This file was deleted.

0 commit comments

Comments
 (0)