-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
327 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
FROM node:20 | ||
FROM python:3 | ||
|
||
ENV NODE_ENV=production | ||
ENV USER_ID= | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update -qq -y && \ | ||
apt-get install -y vim wget | ||
|
||
ADD . /app/ | ||
|
||
# install dependencies | ||
RUN npm install --omit=dev | ||
RUN npm install pm2 -g | ||
RUN pm2 install pm2-logrotate | ||
RUN pm2 set pm2-logrotate:compress true | ||
RUN pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss | ||
RUN pm2 set pm2-logrotate:rotateInterval '*/5 * * * *' | ||
RUN pm2 set pm2-logrotate:max_size 10M | ||
RUN pm2 set pm2-logrotate:retain 2 | ||
RUN pip install -r requirements.txt | ||
RUN chmod +x /app/entrypoint.sh | ||
|
||
CMD ["/bin/bash", "/app/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
#!/bin/bash | ||
|
||
pm2 flush | ||
pm2 delete all | ||
|
||
pm2 start /app/app.js | ||
|
||
pm2 logs | ||
python3 main.py |
Oops, something went wrong.