Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations #102

Merged
merged 218 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
54c841d
added postgresql functions for graph ql api
twallnerWaretec Sep 5, 2023
32af093
Merge branch 'main' into translations
twallnerWaretec Sep 5, 2023
0b19372
added transcript changes
twallnerWaretec Oct 20, 2023
d034e58
Merge branch 'translations' of https://github.com/twallnerWaretec/rep…
twallnerWaretec Oct 20, 2023
eeabfc3
+ add elasticsearch & pgsync
mariotebest Oct 31, 2023
e959ea2
Merge pull request #1 from twallnerWaretec/elasticsearch
twallnerWaretec Nov 3, 2023
5fae955
Merge pull request #2 from twallnerWaretec/main
twallnerWaretec Nov 3, 2023
58b57f6
fixes
twallnerWaretec Nov 9, 2023
9f3f334
frontend fixes
twallnerWaretec Dec 1, 2023
9699dd9
fix lineending
twallnerWaretec Dec 1, 2023
2fd5d4f
fixed param
twallnerWaretec Dec 1, 2023
482d28d
fixed contentgrouping and revision in transcript
twallnerWaretec Dec 1, 2023
9f00bd3
removed verbose logging
twallnerWaretec Dec 1, 2023
b4424ee
do transactions
Frando Dec 1, 2023
38178ad
added json plugin
twallnerWaretec Dec 11, 2023
6e286e7
Merge branch 'translations' into translations
twallnerWaretec Dec 11, 2023
1c5a3c3
Merge pull request #97 from twallnerWaretec/translations
twallnerWaretec Dec 11, 2023
d19ead3
fixes for search plugin
twallnerWaretec Dec 11, 2023
679b6e7
Merge branch 'prisma-transactions' into translations
twallnerWaretec Dec 11, 2023
1219a78
recompiled types
twallnerWaretec Dec 11, 2023
729ea1b
fixed build docker file
twallnerWaretec Dec 11, 2023
834f588
add cba key to docker file
twallnerWaretec Dec 11, 2023
bdc10c5
frontend fixes
twallnerWaretec Dec 11, 2023
651df62
removed console.log
twallnerWaretec Dec 11, 2023
e6a1224
switched ingest order
twallnerWaretec Dec 11, 2023
f3fe465
more logging
twallnerWaretec Dec 12, 2023
aa09d30
changed direction
twallnerWaretec Dec 12, 2023
8601715
fixed translations mapping
twallnerWaretec Dec 12, 2023
8834de5
fixed frontend communication with graphql on prod
twallnerWaretec Dec 12, 2023
6ca66be
elastic search changes
twallnerWaretec Feb 12, 2024
f2e2bce
fixed docker compose
twallnerWaretec Feb 12, 2024
705fb1c
updated schema.json
twallnerWaretec Feb 12, 2024
8f9ed79
fixed elastic search ordering
twallnerWaretec Feb 14, 2024
2fa67d7
fixed docker build yml
twallnerWaretec Feb 14, 2024
10762be
fixed rss feed
twallnerWaretec Feb 14, 2024
7a60e89
changed elastic port
twallnerWaretec Feb 14, 2024
df1419b
fixed docker yml files
twallnerWaretec Feb 15, 2024
d506247
changed host settings es
twallnerWaretec Feb 15, 2024
c1abb74
fixes
twallnerWaretec Feb 15, 2024
fd5ea56
no container names
twallnerWaretec Feb 15, 2024
3f69d69
changed volume path
twallnerWaretec Feb 15, 2024
c28c955
fixed port mappings pgsync
twallnerWaretec Feb 15, 2024
2af79e1
save contenturl in content item
twallnerWaretec Feb 16, 2024
29bab5b
fixed ipv4 resolution
twallnerWaretec Feb 20, 2024
8f7e4f7
docker to docker communication
twallnerWaretec Feb 20, 2024
b5d6c4c
host fixed
twallnerWaretec Feb 20, 2024
5430b5b
changed pgsync log_level
twallnerWaretec Feb 20, 2024
7a4ef80
set logging to info
twallnerWaretec Feb 20, 2024
8253e2a
log_level warning
twallnerWaretec Feb 20, 2024
87ba6b2
fixed docker-compose
twallnerWaretec Feb 20, 2024
dd86408
fixes
twallnerWaretec Feb 20, 2024
4821acb
datasource fixes
twallnerWaretec Feb 22, 2024
d3ef34e
readme changed
twallnerWaretec Feb 22, 2024
aa6af06
Merge branch 'main' into translations
twallnerWaretec Feb 22, 2024
f06e253
fixed activitypub ds for multilingual
twallnerWaretec Feb 22, 2024
74a98d9
fixed undici
twallnerWaretec Feb 22, 2024
5d82bcf
undici fix 2
twallnerWaretec Feb 22, 2024
d3f7893
fixed contentgrouping schema.json
twallnerWaretec Feb 22, 2024
b289e5c
transaction timeout increased
twallnerWaretec Feb 28, 2024
5020eb4
added concept filter + optimized schema.json a little
twallnerWaretec Feb 29, 2024
90f8fb9
fixed rss paging
twallnerWaretec Feb 29, 2024
62c3809
added delete repo + docker compose fix
twallnerWaretec Mar 4, 2024
04e0951
log level debug
twallnerWaretec Mar 4, 2024
c41496a
fixed readme
twallnerWaretec Mar 4, 2024
e698299
added migration
twallnerWaretec Mar 4, 2024
47d10fd
fixed tests
twallnerWaretec Mar 4, 2024
98eee4d
fixed docker compose
twallnerWaretec Mar 4, 2024
ba38ab9
Merge branch 'main' into translations
twallnerWaretec Mar 4, 2024
8c0c872
added delete repo cli command
twallnerWaretec Mar 4, 2024
65bda97
Merge branch 'translations' of https://github.com/repco-org/repco int…
twallnerWaretec Mar 4, 2024
cf05436
adjusted pgsync schema.json
twallnerWaretec Mar 4, 2024
456894f
fix: parse pubDate as UTC
Frando Mar 13, 2024
d82c11a
fix: recreate cba test fixtures
Frando Mar 13, 2024
f6d548c
fix: recreate cba fixtures
Frando Mar 13, 2024
71410cc
added originalLanguages + misc
twallnerWaretec Mar 18, 2024
786021b
Merge branch 'translations' of https://github.com/repco-org/repco int…
twallnerWaretec Mar 18, 2024
5065e76
added postgresql functions for graph ql api
twallnerWaretec Sep 5, 2023
6862e03
added transcript changes
twallnerWaretec Oct 20, 2023
785e4bf
+ add elasticsearch & pgsync
mariotebest Oct 31, 2023
0d83b44
fixes
twallnerWaretec Nov 9, 2023
1c5fc9e
frontend fixes
twallnerWaretec Dec 1, 2023
e05c626
fix lineending
twallnerWaretec Dec 1, 2023
c78bca4
fixed param
twallnerWaretec Dec 1, 2023
32c3e65
fixed contentgrouping and revision in transcript
twallnerWaretec Dec 1, 2023
5af2241
removed verbose logging
twallnerWaretec Dec 1, 2023
04b3f05
added json plugin
twallnerWaretec Dec 11, 2023
cbbb8ca
fixes for search plugin
twallnerWaretec Dec 11, 2023
6e7fd99
do transactions
Frando Dec 1, 2023
5d8ad20
recompiled types
twallnerWaretec Dec 11, 2023
adf528f
fixed build docker file
twallnerWaretec Dec 11, 2023
a965485
add cba key to docker file
twallnerWaretec Dec 11, 2023
33ea3a9
frontend fixes
twallnerWaretec Dec 11, 2023
8da9346
removed console.log
twallnerWaretec Dec 11, 2023
453fd2d
switched ingest order
twallnerWaretec Dec 11, 2023
c89d048
more logging
twallnerWaretec Dec 12, 2023
8fbd57e
changed direction
twallnerWaretec Dec 12, 2023
fc03b2a
fixed translations mapping
twallnerWaretec Dec 12, 2023
f498708
fixed frontend communication with graphql on prod
twallnerWaretec Dec 12, 2023
95411c2
elastic search changes
twallnerWaretec Feb 12, 2024
93e5b9e
fixed docker compose
twallnerWaretec Feb 12, 2024
b396108
updated schema.json
twallnerWaretec Feb 12, 2024
9e78676
fixed elastic search ordering
twallnerWaretec Feb 14, 2024
9e90cfa
fixed docker build yml
twallnerWaretec Feb 14, 2024
a2767fd
fixed rss feed
twallnerWaretec Feb 14, 2024
b1f4a2a
changed elastic port
twallnerWaretec Feb 14, 2024
46568f3
fixed docker yml files
twallnerWaretec Feb 15, 2024
f51ab10
changed host settings es
twallnerWaretec Feb 15, 2024
8391042
fixes
twallnerWaretec Feb 15, 2024
390068f
no container names
twallnerWaretec Feb 15, 2024
1386df9
changed volume path
twallnerWaretec Feb 15, 2024
3a7297b
fixed port mappings pgsync
twallnerWaretec Feb 15, 2024
43d7c88
save contenturl in content item
twallnerWaretec Feb 16, 2024
41bce7b
fixed ipv4 resolution
twallnerWaretec Feb 20, 2024
609961e
docker to docker communication
twallnerWaretec Feb 20, 2024
f67e199
host fixed
twallnerWaretec Feb 20, 2024
1684a85
changed pgsync log_level
twallnerWaretec Feb 20, 2024
7f9d261
set logging to info
twallnerWaretec Feb 20, 2024
0520d4a
log_level warning
twallnerWaretec Feb 20, 2024
dbbe2d9
fixed docker-compose
twallnerWaretec Feb 20, 2024
b2f91e2
fixes
twallnerWaretec Feb 20, 2024
d783a9e
datasource fixes
twallnerWaretec Feb 22, 2024
c67b30d
readme changed
twallnerWaretec Feb 22, 2024
bf12598
fixed activitypub ds for multilingual
twallnerWaretec Feb 22, 2024
d523af2
fixed undici
twallnerWaretec Feb 22, 2024
e88a042
undici fix 2
twallnerWaretec Feb 22, 2024
8f59d58
fixed contentgrouping schema.json
twallnerWaretec Feb 22, 2024
10ac4e7
transaction timeout increased
twallnerWaretec Feb 28, 2024
cc389b0
added concept filter + optimized schema.json a little
twallnerWaretec Feb 29, 2024
c078e8e
fixed rss paging
twallnerWaretec Feb 29, 2024
00a27d0
added delete repo + docker compose fix
twallnerWaretec Mar 4, 2024
d6cc803
log level debug
twallnerWaretec Mar 4, 2024
487e46d
fixed readme
twallnerWaretec Mar 4, 2024
7373827
added migration
twallnerWaretec Mar 4, 2024
fb44fbf
fixed tests
twallnerWaretec Mar 4, 2024
db0bab2
fixed docker compose
twallnerWaretec Mar 4, 2024
7cf04e6
added delete repo cli command
twallnerWaretec Mar 4, 2024
0613c1c
adjusted pgsync schema.json
twallnerWaretec Mar 4, 2024
5ced57f
added originalLanguages + misc
twallnerWaretec Mar 18, 2024
09d5c3e
fix: parse pubDate as UTC
Frando Mar 13, 2024
01232a4
fix: recreate cba test fixtures
Frando Mar 13, 2024
c23d432
fix: recreate cba fixtures
Frando Mar 13, 2024
2c745ba
regenerated graphql schema and zod client
twallnerWaretec Mar 18, 2024
38846f6
Merge branch 'translations' of https://github.com/repco-org/repco int…
twallnerWaretec Mar 18, 2024
1462711
changed naming for plugin
twallnerWaretec Mar 18, 2024
baec679
Merge remote-tracking branch 'origin/main' into translations
Frando Mar 26, 2024
f06950f
tests: fix basic tests
Frando Mar 26, 2024
f82eb75
more elastic search query logging
twallnerWaretec Mar 28, 2024
4947fe9
logger settings
twallnerWaretec Mar 28, 2024
32ab331
logger.
twallnerWaretec Mar 28, 2024
eff99c3
more logging
twallnerWaretec Mar 28, 2024
5794e0c
limit es query size
twallnerWaretec Mar 28, 2024
3af50f8
fixed rss ds for okto endpoint
twallnerWaretec Apr 4, 2024
e1b0645
adjusted logging
twallnerWaretec Apr 4, 2024
8b9d58b
join fixes
twallnerWaretec Apr 4, 2024
706068a
logging ist still necessary
twallnerWaretec Apr 4, 2024
e5a6dfb
limit elastic results based on score
twallnerWaretec Apr 4, 2024
8df8546
filter in statement as well
twallnerWaretec Apr 4, 2024
8fb3e15
pg logging
twallnerWaretec Apr 4, 2024
0e901de
line ending fix
twallnerWaretec Apr 9, 2024
7c06bac
new docker compose file
twallnerWaretec Apr 9, 2024
b009baa
temp
twallnerWaretec Apr 9, 2024
db370de
fixed elastic search not finding results
twallnerWaretec Apr 9, 2024
99f51f7
fixed elastic url
twallnerWaretec Apr 9, 2024
b503ee6
new ingester + showcase
twallnerWaretec Apr 30, 2024
e9809c2
port changes
twallnerWaretec Apr 30, 2024
ed27e68
fixed circular reference
twallnerWaretec Apr 30, 2024
e3072bf
docs updated
twallnerWaretec Apr 30, 2024
7b45dd1
fixed showcase docker compose
twallnerWaretec May 7, 2024
633d829
removed listener for new ingester
twallnerWaretec May 15, 2024
dcc966c
circular dependency fix
twallnerWaretec May 15, 2024
f6e861e
removed old reference
twallnerWaretec May 15, 2024
ab230f5
fixed circular ref
twallnerWaretec May 15, 2024
a64b0dd
fixed rss:link element undefined sometimes
twallnerWaretec May 15, 2024
f7c6190
fixed db port showcase
twallnerWaretec May 27, 2024
114b658
frontend changes temp
twallnerWaretec Jun 7, 2024
b79f9f4
Merge branch 'arso/translations' into translations
twallnerWaretec Jun 7, 2024
11bbe29
test fixes
twallnerWaretec Jun 7, 2024
aaa9454
fix application error
twallnerWaretec Jun 18, 2024
f784d80
misc fixes
twallnerWaretec Jun 18, 2024
5db7307
fixed subtitle typing
twallnerWaretec Jun 18, 2024
45cdfac
fixed repo count
twallnerWaretec Jun 18, 2024
9e5b0b0
fixes + frontend changes
twallnerWaretec Jun 19, 2024
4e376bb
fixed repo counts
twallnerWaretec Jun 19, 2024
bc19969
frontend fixes
twallnerWaretec Jun 20, 2024
ce30c31
added shellscript to init ds config
twallnerWaretec Jun 20, 2024
d9b823b
allow duplicate ds registers
twallnerWaretec Jun 20, 2024
846c25a
fixes
twallnerWaretec Jun 20, 2024
8fb1dec
added reset script
twallnerWaretec Jun 20, 2024
7f3324d
added more config
twallnerWaretec Jun 20, 2024
4c8832e
fix: activitypub ingest for large feeds
Frando Jun 21, 2024
4a03197
multiple fixes
twallnerWaretec Jun 21, 2024
06dc5de
Merge remote-tracking branch 'origin/fix-ap-ingest' into translations
twallnerWaretec Jun 21, 2024
304db6f
fixed env variables
twallnerWaretec Jun 21, 2024
149c236
added ds
twallnerWaretec Jun 21, 2024
c4eb899
profile picture fix
twallnerWaretec Jun 21, 2024
cf0ac19
fixed db schema problem
twallnerWaretec Jun 21, 2024
584a83b
fixes
twallnerWaretec Jun 21, 2024
71f1997
removed empty code
twallnerWaretec Jun 21, 2024
d7e34b8
profile picture nullable
twallnerWaretec Jun 21, 2024
a5534b6
fix contribution links
twallnerWaretec Jun 21, 2024
bd7c38a
reduced page size transposer
twallnerWaretec Jun 21, 2024
d68e47d
fixed multiple stations in repo
twallnerWaretec Jun 21, 2024
1b0bace
increased prisma timeout
twallnerWaretec Jun 21, 2024
5913386
test stations
twallnerWaretec Jun 21, 2024
21b2880
fixed graphiql plugin not showing
twallnerWaretec Jun 21, 2024
bad4a3d
script clean up
twallnerWaretec Jun 21, 2024
f3f7d06
prod scripts
twallnerWaretec Jun 21, 2024
15a4f54
fixed env var
twallnerWaretec Jun 21, 2024
541139d
timeout increase
twallnerWaretec Jun 21, 2024
6f9c4e8
increased shared memory size
twallnerWaretec Jun 24, 2024
bc234c6
lang code fix
twallnerWaretec Jun 24, 2024
412fd43
fixed unlimited logging problem
twallnerWaretec Jun 24, 2024
c7b3746
fixed empty item bug in rss feed
twallnerWaretec Jun 24, 2024
22fc845
arbeit showcase config updated
twallnerWaretec Jun 24, 2024
f69d980
fix: activitypub ingest
Frando Jun 24, 2024
db90e69
fixed tests
twallnerWaretec Jun 25, 2024
49cb263
fixed lint errors
twallnerWaretec Jun 25, 2024
a7609b3
fixed lint
twallnerWaretec Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Note: These are priliminary docs for how to run Repco in a developer's setup. Do

#### Requirements

* Node.js v18+
* yarn v1 (yarn classic)
* Docker and Docker Compose
- Node.js v18+
- yarn v1 (yarn classic)
- Docker and Docker Compose

### Development setup

Expand Down
97 changes: 93 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,114 @@

version: '3.1'

services:

db:
image: postgres
container_name: repco-db
# restart: always
volumes:
- "./data/postgres:/var/lib/postgresql/data"
- './data/postgres:/var/lib/postgresql/data'
ports:
- 5432:5432
command:
['postgres', '-c', 'wal_level=logical', '-c', 'max_replication_slots=4']
environment:
POSTGRES_PASSWORD: repco
POSTGRES_USER: repco
POSTGRES_DB: repco

meilisearch:
image: getmeili/meilisearch:v1.0
ports:
ports:
- 7700:7700
environment:
- MEILI_MASTER_KEY=${MEILISEARCH_API_KEY}
volumes:
- ./data/meilisearch:/meili_data

es01:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
container_name: repco-es
labels:
co.elastic.logs/module: elasticsearch
volumes:
- ./data/elastic/es01:/var/lib/elasticsearch/data
ports:
- ${ELASTIC_PORT}:9200
environment:
- node.name=es01
- cluster.name=${ELASTIC_CLUSTER_NAME}
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- xpack.license.self_generated.type=${ELASTIC_LICENSE}
- ES_JAVA_OPTS=-Xms750m -Xmx750m
- http.host=0.0.0.0
- transport.host=127.0.0.1
#mem_limit: 1073741824
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
'CMD-SHELL',
"curl -s --user elastic:${ELASTIC_PASSWORD} -X GET http://localhost:9200/_cluster/health?pretty | grep status | grep -q '\\(green\\|yellow\\)'",
]
interval: 10s
timeout: 10s
retries: 120

redis:
image: 'redis:alpine'
container_name: repco-redis
command: ['redis-server', '--requirepass', '${REDIS_PASSWORD}']
volumes:
- ./data/redis:/data
ports:
- '6379:6379'

pgsync:
build:
context: ./pgsync
container_name: repco-pgsync
volumes:
- ./data/pgsync:/data
sysctls:
- net.ipv4.tcp_keepalive_time=200
- net.ipv4.tcp_keepalive_intvl=200
- net.ipv4.tcp_keepalive_probes=5
labels:
org.label-schema.name: 'pgsync'
org.label-schema.description: 'Postgres to Elasticsearch sync'
com.label-schema.service-type: 'daemon'
depends_on:
- db
- es01
- redis
environment:
- PG_USER=repco
- PG_HOST=db
- PG_PORT=5432
- PG_PASSWORD=repco
- PG_DATABASE=repco
- LOG_LEVEL=DEBUG
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=es01
- ELASTICSEARCH_CHUNK_SIZE=100
- ELASTICSEARCH_MAX_CHUNK_BYTES=3242880
- ELASTICSEARCH_MAX_RETRIES=14
- ELASTICSEARCH_QUEUE_SIZE=1
- ELASTICSEARCH_STREAMING_BULK=True
- ELASTICSEARCH_THREAD_COUNT=1
- ELASTICSEARCH_TIMEOUT=320
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_AUTH=${REDIS_PASSWORD}
- REDIS_READ_CHUNK_SIZE=100
- ELASTICSEARCH=true
- OPENSEARCH=false
- SCHEMA=/data
- CHECKPOINT_PATH=/data
111 changes: 107 additions & 4 deletions docker/docker-compose.build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,134 @@

version: '3.1'

services:
app:
build:
context: '..'
dockerfile: './docker/Dockerfile'
container_name: repco-app
restart: unless-stopped
ports:
- 8766:8765
# links:
# - 'es01:repco-es'
environment:
- DATABASE_URL=postgresql://repco:repco@db:5432/repco
- REPCO_ADMIN_TOKEN=kUBY0zsPHC9ubj3T6DZJKUACi3M=
- REPCO_URL=http://localhost:8765
- CBA_API_KEY=k8WHfNbal0rjIs2f
- AP_BASE_URL=http://localhost:8765/ap
depends_on:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AP_BASE_URL can be removed now that #101 is merged

db:
condition: service_healthy

db:
image: postgres
# volumes:
# - "/tmp/repco/postgres:/var/lib/postgresql/data"
container_name: repco-db
restart: unless-stopped
volumes:
- './data/postgres:/var/lib/postgresql/data'
expose:
- 5432
command:
['postgres', '-c', 'wal_level=logical', '-c', 'max_replication_slots=4']
environment:
POSTGRES_PASSWORD: repco
POSTGRES_USER: repco
POSTGRES_DB: repco
healthcheck:
test: ["CMD-SHELL", "pg_isready -U repco"]
test: ['CMD-SHELL', 'pg_isready -U repco']
interval: 5s
timeout: 5s
retries: 5

es01:
image: docker.elastic.co/elasticsearch/elasticsearch:8.10.4
container_name: repco-es
restart: unless-stopped
labels:
co.elastic.logs/module: elasticsearch
volumes:
- ./data/elastic/es01:/var/lib/elasticsearch/data
ports:
- 9201:9200
environment:
- node.name=es01
- cluster.name=repco-es
- discovery.type=single-node
- ELASTIC_PASSWORD=repco
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- xpack.license.self_generated.type=basic
- ES_JAVA_OPTS=-Xms750m -Xmx4g
- http.host=0.0.0.0
- transport.host=127.0.0.1
#mem_limit: 1073741824
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
'CMD-SHELL',
"curl -s --user elastic:repco -X GET http://localhost:9200/_cluster/health?pretty | grep status | grep -q '\\(green\\|yellow\\)'",
]
interval: 10s
timeout: 10s
retries: 120

redis:
image: 'redis:alpine'
container_name: repco-redis
restart: unless-stopped
command: ['redis-server', '--requirepass', 'repco']
volumes:
- ./data/redis:/data
ports:
- '6379:6379'

pgsync:
build:
context: ../pgsync
container_name: repco-pgsync
restart: unless-stopped
volumes:
- /var/www/repco.cba.media/repco/docker/data/pgsync:/data
sysctls:
- net.ipv4.tcp_keepalive_time=200
- net.ipv4.tcp_keepalive_intvl=200
- net.ipv4.tcp_keepalive_probes=5
labels:
org.label-schema.name: 'pgsync'
org.label-schema.description: 'Postgres to Elasticsearch sync'
com.label-schema.service-type: 'daemon'
depends_on:
- db
- es01
- redis
environment:
- PG_USER=repco
- PG_HOST=db
- PG_PORT=5432
- PG_PASSWORD=repco
- PG_DATABASE=repco
- LOG_LEVEL=DEBUG
- CONSOLE_LOGGING_HANDLER_MIN_LEVEL=DEBUG
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=es01
- ELASTICSEARCH_CHUNK_SIZE=2000
- ELASTICSEARCH_MAX_CHUNK_BYTES=104857600
- ELASTICSEARCH_MAX_RETRIES=14
- ELASTICSEARCH_QUEUE_SIZE=4
- ELASTICSEARCH_STREAMING_BULK=False
- ELASTICSEARCH_THREAD_COUNT=4
- ELASTICSEARCH_TIMEOUT=10
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_AUTH=repco
- REDIS_READ_CHUNK_SIZE=1000
- ELASTICSEARCH=true
- OPENSEARCH=false
- SCHEMA=/data
- CHECKPOINT_PATH=/data
100 changes: 98 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ version: '3.1'
services:
app:
image: arsoxyz/repco:main
container_name: repco-app
restart: unless-stopped
expose:
- 8765
ports:
Expand All @@ -15,16 +17,110 @@ services:

db:
image: postgres
container_name: repco-db
restart: unless-stopped
volumes:
- ./data/repco-db:/var/lib/postgresql/data"
- ./data/repco-db:/var/lib/postgresql/data"
expose:
- 5432
command:
['postgres', '-c', 'wal_level=logical', '-c', 'max_replication_slots=4']
environment:
POSTGRES_PASSWORD: repco
POSTGRES_USER: repco
POSTGRES_DB: repco
healthcheck:
test: ["CMD-SHELL", "pg_isready -U repco"]
test: ['CMD-SHELL', 'pg_isready -U repco']
interval: 5s
timeout: 5s
retries: 5

es01:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
container_name: repco-es
restart: unless-stopped
labels:
co.elastic.logs/module: elasticsearch
volumes:
- ./data/elastic/es01:/var/lib/elasticsearch/data
ports:
- 9201:${ELASTIC_PORT}
environment:
- node.name=es01
- cluster.name=${ELASTIC_CLUSTER_NAME}
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- xpack.license.self_generated.type=${ELASTIC_LICENSE}
- ES_JAVA_OPTS=-Xms750m -Xmx4g
- http.host=0.0.0.0
- transport.host=127.0.0.1
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
'CMD-SHELL',
"curl -s --user elastic:${ELASTIC_PASSWORD} -X GET http://localhost:9200/_cluster/health?pretty | grep status | grep -q '\\(green\\|yellow\\)'",
]
interval: 10s
timeout: 10s
retries: 120

redis:
image: 'redis:alpine'
container_name: repco-redis
restart: unless-stopped
command: ['redis-server', '--requirepass', '${REDIS_PASSWORD}']
volumes:
- ./data/redis:/data
ports:
- '6379:6379'

pgsync:
build:
context: ../pgsync
container_name: repco-pgsync
volumes:
- /var/www/repco.cba.media/repco/docker/data/pgsync:/data
sysctls:
- net.ipv4.tcp_keepalive_time=200
- net.ipv4.tcp_keepalive_intvl=200
- net.ipv4.tcp_keepalive_probes=5
labels:
org.label-schema.name: 'pgsync'
org.label-schema.description: 'Postgres to Elasticsearch sync'
com.label-schema.service-type: 'daemon'
depends_on:
- db
- es01
- redis
environment:
- PG_USER=repco
- PG_HOST=db
- PG_PORT=5432
- PG_PASSWORD=repco
- PG_DATABASE=repco
- LOG_LEVEL=DEBUG
- CONSOLE_LOGGING_HANDLER_MIN_LEVEL=DEBUG
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=es01
- ELASTICSEARCH_CHUNK_SIZE=2000
- ELASTICSEARCH_MAX_CHUNK_BYTES=104857600
- ELASTICSEARCH_MAX_RETRIES=14
- ELASTICSEARCH_QUEUE_SIZE=4
- ELASTICSEARCH_STREAMING_BULK=False
- ELASTICSEARCH_THREAD_COUNT=4
- ELASTICSEARCH_TIMEOUT=10
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_AUTH=repco
- REDIS_READ_CHUNK_SIZE=1000
- ELASTICSEARCH=true
- OPENSEARCH=false
- SCHEMA=/data
- CHECKPOINT_PATH=/data
Loading
Loading