| FROM node:latest | |
| WORKDIR /app | |
| RUN apt-get update && \ | |
| apt-get install -y git && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444 \ | |
| --mount=type=secret,id=GITHUB_REPO,mode=0444 \ | |
| git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/$(cat /run/secrets/GITHUB_REPO).git /app | |
| COPY package*.json ./ | |
| RUN npm install | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["npm", "start"] |