diff options
| author | Fuwn <[email protected]> | 2023-12-06 18:41:46 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-06 18:41:55 -0800 |
| commit | ec79e5ad5e5ce8c1f138b15a91b8c17e6a553c35 (patch) | |
| tree | 7152e0bdc12a0bddf409278fb076d76ec895e26c | |
| parent | ci(earthly): ignores for lint (diff) | |
| download | due.moe-ec79e5ad5e5ce8c1f138b15a91b8c17e6a553c35.tar.xz due.moe-ec79e5ad5e5ce8c1f138b15a91b8c17e6a553c35.zip | |
ci(docker): bring docker back
| -rw-r--r-- | .dockerignore | 11 | ||||
| -rw-r--r-- | Dockerfile | 28 |
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 |