feat: support building docker image

This commit is contained in:
Liam Chan 2024-07-22 15:34:30 +08:00
parent efacb10259
commit abe028577d
3 changed files with 28 additions and 0 deletions

15
.dockerignore Normal file
View File

@ -0,0 +1,15 @@
node_modules
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
README.md
LICENSE
.vscode
Makefile
helm-charts
.env
.editorconfig
.idea
coverage*

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM oven/bun:1
WORKDIR /usr/src/app
COPY . .
RUN bun install --frozen-lockfile --production
ENV NODE_ENV=production
USER bun
EXPOSE 7000/tcp
ENTRYPOINT [ "bun", "run", "index.ts" ]

5
compose.yaml Normal file
View File

@ -0,0 +1,5 @@
services:
netgate-switch:
build: .
ports:
- "7000:7000"