aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-06 18:41:46 -0800
committerFuwn <[email protected]>2023-12-06 18:41:55 -0800
commitec79e5ad5e5ce8c1f138b15a91b8c17e6a553c35 (patch)
tree7152e0bdc12a0bddf409278fb076d76ec895e26c
parentci(earthly): ignores for lint (diff)
downloaddue.moe-ec79e5ad5e5ce8c1f138b15a91b8c17e6a553c35.tar.xz
due.moe-ec79e5ad5e5ce8c1f138b15a91b8c17e6a553c35.zip
ci(docker): bring docker back
-rw-r--r--.dockerignore11
-rw-r--r--Dockerfile28
2 files changed, 39 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000..9af3f70e
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,11 @@
+**
+
+!node_modules/
+!src/
+!static/
+!bun.lockb
+!due_moe_schema.sql
+!package.json
+!svelte.config.js
+!tsconfig.json
+!vite.config.ts \ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..a82993fe
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
+FROM oven/bun:1.0.15 as build
+
+WORKDIR /due
+
+RUN apt update -y
+RUN apt upgrade -y
+RUN apt install sqlite3 -y
+
+COPY package.json ./
+
+RUN bun install
+
+COPY ./ ./
+
+RUN mkdir data
+RUN sqlite3 data/due_moe.sqlite3 < due_moe_schema.sql
+RUN bun --bun vite build
+
+FROM oven/bun:1.0.15
+
+WORKDIR /due
+
+COPY --from=build /due/build ./build
+COPY --from=build /due/data ./data
+
+EXPOSE 3000
+
+CMD ["bun", "./build/index.js"] \ No newline at end of file