Spaces:
Runtime error
Runtime error
File size: 763 Bytes
d720e55 c3b6bd1 d720e55 42de052 5d3d307 10e8815 d720e55 42de052 d720e55 42de052 d720e55 7114b96 d720e55 83213d1 61818f5 c203067 61818f5 83213d1 10e8815 61818f5 10e8815 7114b96 42de052 2252c3d 61818f5 42de052 |
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 39 40 41 42 43 44 45 46 |
FROM node:20-bullseye-slim AS client-builder
WORKDIR /client
ARG REACT_APP_BACKEND_URL=https://anuj-panthri-chatapp.hf.space
ENV REACT_APP_BACKEND_URL=${REACT_APP_BACKEND_URL}
# Copies flutter project
COPY ./client /client
# Building project
RUN npm install
RUN npm run build
# STAGE 2
# Install Node Server
FROM node:20-bullseye-slim
EXPOSE 3000
WORKDIR /server
# Copy server project
COPY ./server /server
COPY --from=client-builder /client/build /client/build
# permissions
RUN chmod 777 /server;
RUN touch /server/main.db;
RUN chmod 777 /server/main.db;
RUN ls -lh
ENV DB_NAME="main.db"
# Install node_modules and run project
RUN npm install
RUN npm run dbinit
RUN chmod 777 /server;
RUN chmod 777 /server/main.db;
RUN ls -lh
CMD npm run server |