mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 02:42:45 +00:00
fix(#166): fix docker build
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/repositories
|
||||
repo/
|
||||
db_backups
|
||||
db_backups
|
||||
build
|
||||
node_modules
|
||||
.github
|
||||
@@ -5,13 +5,12 @@ EXPOSE $PORT
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install pm2 -g
|
||||
RUN pm2 install typescript
|
||||
RUN npm install pm2 -g && pm2 install typescript && npm cache clean --force;
|
||||
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
|
||||
RUN npm install
|
||||
RUN npm install && npm run build && npm cache clean --force
|
||||
|
||||
COPY ecosystem.config.js .
|
||||
COPY healthcheck.js .
|
||||
|
||||
@@ -10,8 +10,6 @@ services:
|
||||
environment:
|
||||
- REDIS_HOSTNAME=redis
|
||||
- DB_HOSTNAME=mongodb
|
||||
volumes:
|
||||
- .:/app
|
||||
ports:
|
||||
- $PORT:$PORT
|
||||
healthcheck:
|
||||
@@ -28,12 +26,19 @@ services:
|
||||
|
||||
redis:
|
||||
image: "redis:alpine"
|
||||
|
||||
restart: always
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- redis-cli
|
||||
- ping
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
mongodb:
|
||||
image: mongo:latest
|
||||
restart: on-failure
|
||||
ports:
|
||||
- "127.0.0.1:27017:27017"
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: $DB_USERNAME
|
||||
MONGO_INITDB_ROOT_PASSWORD: $DB_PASSWORD
|
||||
|
||||
Reference in New Issue
Block a user