All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m48s
25 lines
530 B
Docker
25 lines
530 B
Docker
FROM node:22.14.0-alpine3.21 AS build-stage
|
|
WORKDIR /app
|
|
|
|
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com/
|
|
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:22.14.0-alpine3.21 AS production-stage
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache nginx ffmpeg
|
|
|
|
COPY --from=build-stage /app /app
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
RUN mkdir -p /run/nginx /var/lib/nginx/tmp /var/log/nginx /app/uploads
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["sh", "-c", "node ./node_modules/tsx/dist/cli.mjs server.ts & nginx -g 'daemon off;'"]
|