Skip to content

Commit

Permalink
fixed port mappings pgsync
Browse files Browse the repository at this point in the history
  • Loading branch information
twallnerWaretec committed Feb 15, 2024
1 parent 3f69d69 commit c28c955
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
13 changes: 8 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ services:
labels:
co.elastic.logs/module: elasticsearch
volumes:
- ./data/elastic/es01:/usr/share/elasticsearch/data
- ./data/elastic/es01:/var/lib/elasticsearch/data
ports:
- ${ELASTIC_PORT}:9201
- ${ELASTIC_PORT}:9200
environment:
- node.name=es01
- cluster.name=${ELASTIC_CLUSTER_NAME}
Expand All @@ -42,7 +42,10 @@ services:
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- xpack.license.self_generated.type=${ELASTIC_LICENSE}
mem_limit: ${ELASTIC_MEM_LIMIT}
- ES_JAVA_OPTS=-Xms750m -Xmx750m
- http.host=0.0.0.0
- transport.host=127.0.0.1
#mem_limit: 1073741824
ulimits:
memlock:
soft: -1
Expand All @@ -51,7 +54,7 @@ services:
test:
[
'CMD-SHELL',
"curl -s --user elastic:${ELASTIC_PASSWORD} -X GET http://localhost:9201/_cluster/health?pretty | grep status | grep -q '\\(green\\|yellow\\)'",
"curl -s --user elastic:${ELASTIC_PASSWORD} -X GET http://localhost:9200/_cluster/health?pretty | grep status | grep -q '\\(green\\|yellow\\)'",
]
interval: 10s
timeout: 10s
Expand Down Expand Up @@ -91,7 +94,7 @@ services:
- PG_PASSWORD=repco
- PG_DATABASE=repco
- LOG_LEVEL=DEBUG
- ELASTICSEARCH_PORT=${ELASTIC_PORT}
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=es01
- ELASTICSEARCH_CHUNK_SIZE=100
Expand Down
9 changes: 7 additions & 2 deletions docker/docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ services:

es01:
image: docker.elastic.co/elasticsearch/elasticsearch:8.10.4
container_name: repco-es
labels:
co.elastic.logs/module: elasticsearch
volumes:
Expand All @@ -54,7 +55,9 @@ services:
- xpack.security.enabled=false
- xpack.license.self_generated.type=basic
- ES_JAVA_OPTS=-Xms750m -Xmx750m
#mem_limit: 1073741824
- http.host=0.0.0.0
- transport.host=127.0.0.1
#mem_limit: 1073741824
ulimits:
memlock:
soft: -1
Expand All @@ -71,6 +74,7 @@ services:

redis:
image: 'redis:alpine'
container_name: repco-redis
command: ['redis-server', '--requirepass', 'repco']
volumes:
- ./data/redis:/data
Expand All @@ -80,6 +84,7 @@ services:
pgsync:
build:
context: ../pgsync
container_name: repco-pgsync
volumes:
- ./data/pgsync:/data
sysctls:
Expand All @@ -101,7 +106,7 @@ services:
- PG_PASSWORD=repco
- PG_DATABASE=repco
- LOG_LEVEL=DEBUG
- ELASTICSEARCH_PORT=9201
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=es01
- ELASTICSEARCH_CHUNK_SIZE=100
Expand Down
6 changes: 6 additions & 0 deletions packages/repco-frontend/app/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4553,6 +4553,7 @@ export type Query = {
revision?: Maybe<Revision>
/** Reads and enables pagination through a set of `Revision`. */
revisions?: Maybe<RevisionsConnection>
searchContentItems?: Maybe<Array<ContentItem>>
sourceRecord?: Maybe<SourceRecord>
/** Reads and enables pagination through a set of `SourceRecord`. */
sourceRecords?: Maybe<SourceRecordsConnection>
Expand Down Expand Up @@ -4906,6 +4907,11 @@ export type QueryRevisionsArgs = {
orderBy?: InputMaybe<Array<RevisionsOrderBy>>
}

/** The root query type which gives access points into the data universe. */
export type QuerySearchContentItemsArgs = {
searchText: Scalars['String']
}

/** The root query type which gives access points into the data universe. */
export type QuerySourceRecordArgs = {
uid: Scalars['String']
Expand Down
2 changes: 1 addition & 1 deletion pgsync/src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

wait-for-it $PG_HOST:5432 -t 60
wait-for-it $REDIS_HOST:6379 -t 60
wait-for-it $ELASTICSEARCH_HOST:9201 -t 60
wait-for-it $ELASTICSEARCH_HOST:9200 -t 60

jq '.[].database = env.PG_DATABASE' /data/schema.json | sponge /data/schema.json

Expand Down
2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ ELASTIC_VERSION=8.10.4
ELASTIC_LICENSE=basic
ELASTIC_PORT=9201
ELASTIC_MEM_LIMIT=1073741824
ELASTIC_CLUSTER_NAME=es-repco
ELASTIC_CLUSTER_NAME=repco-es
REDIS_PASSWORD=repco

0 comments on commit c28c955

Please sign in to comment.