| 12 | # Set NODE_ENV to production | 12 | # Set NODE_ENV to production |
| 13 | ENV NODE_ENV=production | 13 | ENV NODE_ENV=production |
| 14 | | 14 | |
| 15 | # Install app dependencies | 15 | # Bundle app source |
| 16 | COPY package*.json post-install.js ./ | 16 | COPY . ./ |
| | 17 | |
| 17 | RUN \ | 18 | RUN \ |
| 18 | echo "*** Install npm packages ***" && \ | 19 | echo "*** Install npm packages ***" && \ |
| 19 | npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force | 20 | npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force |
| 20 | | 21 | |
| 21 | # Bundle app source | | |
| 22 | COPY . ./ | | |
| 23 | | | |
| 24 | # Copy default chats, characters and user avatars to <folder>.default folder | 22 | # Copy default chats, characters and user avatars to <folder>.default folder |
| 25 | RUN \ | 23 | RUN \ |
| 26 | rm -f "config.yaml" || true && \ | 24 | rm -f "config.yaml" || true && \ |