mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-12 18:32:44 +00:00
chore: uses pm2 to start Anonymous GitHub in docker
This commit is contained in:
@@ -5,13 +5,18 @@ EXPOSE $PORT
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install pm2 -g
|
||||
RUN pm2 install typescript
|
||||
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY ecosystem.config.js .
|
||||
COPY healthcheck.js .
|
||||
COPY src .
|
||||
COPY index.ts .
|
||||
COPY public .
|
||||
|
||||
CMD [ "npm", "run", "start" ]
|
||||
CMD [ "pm2-runtime", "ecosystem.config.js"]
|
||||
@@ -4,7 +4,6 @@ services:
|
||||
anonymous_github:
|
||||
build: .
|
||||
restart: always
|
||||
command: nodemon --transpile-only index.ts
|
||||
image: tdurieux/anonymous_github:v2
|
||||
env_file:
|
||||
- ./.env
|
||||
|
||||
13
ecosystem.config.js
Normal file
13
ecosystem.config.js
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "AnonymousGitHub",
|
||||
script: "./index.ts",
|
||||
exec_mode: "fork",
|
||||
watch: true,
|
||||
interpreter: "node",
|
||||
interpreter_args:
|
||||
"--require ts-node/register",
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user