Skip to content

Commit

Permalink
Update Dockerfile and docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 committed Apr 13, 2024
1 parent 4570b08 commit 9604c4e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 35 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ WORKDIR /usr/src/app

COPY package*.json ./

RUN npm i -g @nestjs/cli
RUN npm i --production --force

COPY . .
Expand Down
70 changes: 35 additions & 35 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
version: '3.9'

x-telegram-common:
&telegram-common
build:
context: .
dockerfile: Dockerfile
target: production
restart: unless-stopped
env_file:
- ./.env
depends_on:
rabbitmq:
condition: service_healthy
neo4j:
condition: service_healthy
mongodb:
condition: service_healthy

services:
mongodb:
container_name: mongodb
Expand Down Expand Up @@ -51,42 +68,25 @@ services:
- NEO4J_PLUGINS=["apoc", "graph-data-science"]
- NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.*
- NEO4J_AUTH=neo4j/password
healthcheck:
test: ["CMD" ,"wget", "http://localhost:7474"]
interval: 1m30s
timeout: 10s
retries: 2
start_period: 40s

# bot:
# container_name: bot
# build:
# context: .
# dockerfile: Dockerfile
# target: development
# command: npm run start:dev bot
# restart: unless-stopped
# env_file:
# - .env
# volumes:
# - .:/usr/src/app
# - ./node_modules:/usr/src/app/node_modules
# depends_on:
# rabbitmq:
# condition: service_healthy

# event-store:
# container_name: event-store
# build:
# context: .
# dockerfile: Dockerfile
# target: development
# command: npm run start:dev event-store
# restart: unless-stopped
# env_file:
# - .env
# volumes:
# - .:/usr/src/app
# - ./node_modules:/usr/src/app/node_modules
# depends_on:
# mongodb:
# condition: service_healthy
# rabbitmq:
# condition: service_healthy
telegram-bot:
<<: [*telegram-common]
container_name: telegram-bot
command: npm run start bot
telegram-events:
<<: [*telegram-common]
container_name: telegram-events
command: npm run start event-store
telegram-graph:
<<: [*telegram-common]
container_name: telegram-graph
command: npm run start graph-store

volumes:
mongo_data:
Expand Down

0 comments on commit 9604c4e

Please sign in to comment.