trianta.dev/Dockerfile
2024-11-16 02:45:38 -06:00

26 lines
357 B
Docker

FROM nginx:latest
RUN apt-get update && apt-get install -y nodejs npm netcat-openbsd
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
WORKDIR /usr/share/nginx/html
COPY index.html .
COPY default.css .
RUN mkdir -p /usr/share/nginx/html/public
RUN cp /app/build/* ./public
HEALTHCHECK CMD nc -z 127.0.0.1 80
EXPOSE 80