Spaces:
Runtime error
Runtime error
File size: 1,021 Bytes
5bb150a cd604f5 16ae86b 6724b65 16ae86b 5bb150a babac42 f1e3aed 5bb150a f1e3aed 5bb150a f1e3aed 5bb150a f1e3aed 5bb150a f1e3aed 5bb150a f1e3aed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
FROM node:16-alpine as build-frontend
# Set the working directory
WORKDIR /app
# Copy package files and install dependencies
COPY frontend/package*.json /app/frontend/
RUN npm install --prefix frontend/
RUN npm ci --prefix frontend/
# Copy the rest of the application files
COPY frontend/ /app/frontend/
RUN --mount=type=secret,id=PUBLIC_BACKEND_WS_URL,mode=0444,required=true \
echo "PUBLIC_BACKEND_WS_URL=$(cat /run/secrets/PUBLIC_BACKEND_WS_URL)" > frontend/.env
RUN npm run build --prefix frontend/
FROM nginxinc/nginx-unprivileged:alpine
COPY --from=build-frontend /app/frontend/build /usr/share/nginx/html
# # Start a new stage using python:3.9-alpine
# FROM python:3.9-alpine
# # Copy the built front-end files
# COPY --from=build-frontend /app/frontend/build /app/build
# COPY /backend /app
# # Install uvicorn
# RUN pip install uvicorn fastapi
# # Set the working directory
# WORKDIR /app
# # Run the uvicorn server
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
# EXPOSE 8000 |