From 72a755240bbc3a6937fc3215f33dcc9fdb97de2a Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 17 Dec 2024 00:00:40 -0500 Subject: [PATCH] Dockerize --- .gitignore | 3 ++- Dockerfile | 8 ++++++++ docker-compose.yml | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index 02da45d..79fec7d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea/ bun.lockb node_modules/ -public/css/styles.css \ No newline at end of file +public/css/styles.css +package-lock.json \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8fc359a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:22 +WORKDIR /app +COPY package.json bun.lockb ./ +RUN npm install -g bun && bun install +COPY . . +RUN bun run build:css +EXPOSE 3000 +CMD ["bun", "app.js"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cee7b63 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + app: + build: . + ports: + - "3000:3000" + volumes: + - .:/app + command: ["bun", "app.js"] \ No newline at end of file