aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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