Spaces:
Sleeping
Sleeping
| FROM node:18 | |
| WORKDIR /usr/src/app/ | |
| RUN apt-get update && \ | |
| apt-get install -y git python3 python3-venv && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN python3 -m venv /usr/src/app/venv | |
| COPY rd.txt ./ | |
| RUN /usr/src/app/venv/bin/pip install --no-cache-dir -r rd.txt | |
| RUN --mount=type=secret,id=cipherx,mode=0444,required=true \ | |
| sh -c 'echo "cipherx = \"$(cat /run/secrets/cipherx)\"" >> /usr/src/app/cipherX.py' | |
| RUN --mount=type=secret,id=cipherw,mode=0444,required=true \ | |
| sh -c 'echo "cipherw = \"$(cat /run/secrets/cipherw)\"" >> /usr/src/app/cipherW.py' | |
| COPY loki.py ./ | |
| RUN /usr/src/app/venv/bin/python loki.py | |
| COPY package*.json ./ | |
| RUN rm cipherW.py cipherX.py | |
| RUN npm install | |
| COPY . . | |
| RUN npm run build | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| # Use the virtual environment to run the Node.js application | |
| # Note: Ensure that the Node.js application can use the virtual environment if needed | |
| CMD ["npm", "start"] |