Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…lace into fix-for-communication-issue-between-datalayer-and-other-services
  • Loading branch information
islandj123 committed Jun 19, 2024
2 parents c134745 + 48efcc2 commit fb838ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 2 additions & 0 deletions apps/data/elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:8.13.4

HEALTHCHECK CMD curl -k https://elastic:$ELASTIC_PASSWORD@localhost:8311/_cluster/health

COPY elasticsearch.yml /usr/share/elasticsearch/config/elasticsearch.yml
24 changes: 13 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
depends_on: []
volumes: [ ./apps/frontend/src:/app/src ]
environment: []
ports: [ 8101:8101 ]
#ports: [ 8101:8101 ]
networks: [ proxy-frontend ]

proxy:
Expand All @@ -32,7 +32,7 @@ services:
volumes: [ ./apps/backend/user/src:/app/service/src ]
environment:
- DB_ENDPOINT=postgres://martletplace:johuigytfrdcv@datalayer:8300/martletplace
ports: [ 8211:8211 ]
#ports: [ 8211:8211 ]
networks: [ proxy-user, user-datalayer ]

listing:
Expand All @@ -46,7 +46,7 @@ services:
volumes: [ ./apps/backend/listing/src:/app/service/src ]
environment:
- DB_ENDPOINT=postgres://martletplace:johuigytfrdcv@datalayer:8300/martletplace
ports: [ 8212:8212 ]
#ports: [ 8212:8212 ]
networks: [ proxy-listing, listing-datalayer ]

review:
Expand All @@ -60,7 +60,7 @@ services:
volumes: [ ./apps/backend/review/src:/app/service/src ]
environment:
- DB_ENDPOINT=postgres://martletplace:johuigytfrdcv@datalayer:8300/martletplace
ports: [ 8213:8213 ]
#ports: [ 8213:8213 ]
networks: [ proxy-review, review-datalayer ]

message:
Expand All @@ -71,18 +71,20 @@ services:
volumes: [ ./apps/backend/message/src:/app/src ]
environment:
- DB_ENDPOINT=postgres://martletplace:johuigytfrdcv@datalayer:8300/martletplace
ports: [ 8214:8214 ]
#ports: [ 8214:8214 ]
networks: [ proxy-message, message-datalayer ]

search:
build: apps/algorithm/search
container_name: martletplace_search
restart: unless-stopped
depends_on: []
depends_on:
elasticsearch:
condition: service_healthy
volumes: [ ./apps/algorithm/search/src:/app/src ]
environment:
- ES_ENDPOINT=https://elastic:serxdfcghjfc@elasticsearch:8311
ports: [ 8221:8221 ]
#ports: [ 8221:8221 ]
networks: [ proxy-search, search-datalayer ]

recommend:
Expand All @@ -92,7 +94,7 @@ services:
depends_on: []
volumes: [ ./apps/algorithm/recommend/src:/app/src ]
environment: []
ports: [ 8222:8222 ]
#ports: [ 8222:8222 ]
networks: [ proxy-recommend, recommend-datalayer ]

datalayer:
Expand All @@ -108,7 +110,7 @@ services:
- POSTGRESQL_DATABASE=martletplace
- POSTGRESQL_HOST=database
- POSTGRESQL_PORT=8310
ports: [ 8300:8300, 8301:8301 ]
#ports: [ 8300:8300, 8301:8301 ]
networks: [ datalayer-database, datalayer-elasticsearch, datalayer-cache, datalayer-blob, user-datalayer, listing-datalayer, review-datalayer, message-datalayer, search-datalayer, recommend-datalayer ]

database:
Expand All @@ -121,7 +123,7 @@ services:
- POSTGRES_USER=martletplace
- POSTGRES_PASSWORD=johuigytfrdcv
- POSTGRES_DB=martletplace
ports: [ 8310:8310 ]
#ports: [ 8310:8310 ]
networks: [ datalayer-database ]

elasticsearch:
Expand All @@ -132,7 +134,7 @@ services:
volumes: []
environment:
- ELASTIC_PASSWORD=serxdfcghjfc
ports: [ 8311:8311 ]
#ports: [ 8311:8311 ]
networks: [ datalayer-elasticsearch, search-datalayer ]
mem_limit: 1GB

Expand Down

0 comments on commit fb838ce

Please sign in to comment.