refactor(docker): rework docker

- Move Docker files to own directory (tidier since I added several more files)
- Optimise images and reduce size
  - Uses multi-stage builds
  - Optimises layer efficiency
  - Uses NGINX as base for frontend
- Sets default env vars
- Uses tini for proper signal handling
This commit is contained in:
tigattack
2025-09-22 22:33:01 +01:00
parent 43ce146987
commit bf2ea908f4
8 changed files with 152 additions and 38 deletions

View File

@@ -1,16 +0,0 @@
FROM node:lts-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN npm install --only=production
EXPOSE 3000
CMD ["node", "server.js"]