chore: add docker support and gitea workflows #1
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.env
|
||||||
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Credit: https://www.digitalocean.com/community/tutorials/how-to-build-a-node-js-application-with-docker
|
||||||
|
|
||||||
|
FROM node:24-trixie-slim AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./kittyurl-frontend/package*.json ./
|
||||||
|
RUN npm ci && npm cache clean --force
|
||||||
|
COPY ./kittyurl-frontend/ .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM node:24-trixie-slim AS production
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
RUN addgroup --gid 1001 nodejs && \
|
||||||
|
adduser --gid 1001 --uid 1001 nodejs
|
||||||
|
COPY --from=builder --chown=nodejs:nodejs /app /app
|
||||||
|
USER nodejs
|
||||||
|
|
||||||
|
EXPOSE 6568
|
||||||
|
|
||||||
|
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "6568"]
|
||||||
Reference in New Issue
Block a user