| |
| FROM node:18-alpine |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN apk add --no-cache git python3 make g++ |
|
|
| |
| RUN yarn config set registry https://registry.npmmirror.com |
|
|
| |
| RUN npm install -g pm2 |
|
|
| |
| RUN git clone https://github.com/yinxin630/fiora.git -b master . && \ |
| rm -rf .git |
|
|
| |
| RUN yarn install --network-timeout 100000 || \ |
| (yarn cache clean && yarn install --network-timeout 100000) |
|
|
| |
| RUN yarn build:web |
|
|
| |
| RUN echo "JwtSecret=your_random_secret_here" > .env |
|
|
| |
| EXPOSE 9200 |
|
|
| |
| CMD ["pm2-runtime", "start", "yarn", "--", "start"] |
|
|
| |
| HEALTHCHECK --interval=30s --timeout=10s \ |
| CMD curl -f http://localhost:9200 || exit 1 |