izaac-frontend/Dockerfile
Jakub K f9913cd9bb
All checks were successful
continuous-integration/drone Build is passing
CI/CD
2023-11-19 20:44:45 +01:00

17 lines
518 B
Docker

# Stage 1: Build the React application
FROM node:alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN npx tailwindcss -i ./src/index.css -o ./dist/output.css --watch
# Stage 2: Serve the app from Nginx
FROM nginx:alpine
# Copy the build output to replace the default nginx contents.
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
# Expose port 80 to the outside
EXPOSE 80
# Start Nginx when the container has provisioned.
CMD ["nginx", "-g", "daemon off;"]