90 lines
2.1 KiB
YAML
90 lines
2.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16.0-bookworm
|
|
user: 0:0
|
|
environment:
|
|
POSTGRES_USER: collabry
|
|
POSTGRES_DB: collabry
|
|
POSTGRES_PASSWORD: Passw0rd
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
ports:
|
|
- 5432:5432
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready", "-d", "app"]
|
|
|
|
redis:
|
|
image: redis:7.2.1-bookworm
|
|
ports:
|
|
- 6379:6379
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
|
|
|
|
zookeeper:
|
|
image: confluentinc/cp-zookeeper:7.5.0
|
|
user: 0:0
|
|
environment:
|
|
ZOOKEEPER_CLIENT_PORT: 2181
|
|
ZOOKEEPER_TICK_TIME: 2000
|
|
ports:
|
|
- 2181:2181
|
|
healthcheck:
|
|
test: nc -z localhost 2181 || exit -1
|
|
|
|
kafka:
|
|
image: confluentinc/cp-kafka:7.5.0
|
|
user: 0:0
|
|
environment:
|
|
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
|
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9091
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
|
|
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
depends_on:
|
|
- zookeeper
|
|
ports:
|
|
- 9091:9091
|
|
healthcheck:
|
|
test: nc -z localhost 9091 || exit -1
|
|
|
|
elasticsearch:
|
|
image: elasticsearch:8.6.2
|
|
volumes:
|
|
- es-data:/usr/share/elasticsearch/data
|
|
environment:
|
|
- discovery.type=single-node
|
|
- ES_JAVA_OPTS=-Xms512m -Xmx512m
|
|
ports:
|
|
- "9300:9300"
|
|
- "9200:9200"
|
|
healthcheck:
|
|
test: curl -f http://elasticsearch:9200/_cat/health
|
|
interval: 5s
|
|
timeout: 10s
|
|
|
|
# pgsync:
|
|
# build:
|
|
# context: pgsync
|
|
# environment:
|
|
# PG_USER: collabry
|
|
# PG_PASSWORD: Passw0rd
|
|
# PG_HOST: postgres
|
|
# PG_PORT: 5432
|
|
# REDIS_PORT: 6379
|
|
# REDIS_HOST: redis
|
|
# ELASTICSEARCH_HOST: elasticsearch
|
|
# ELASTICSEARCH_PORT: 9200
|
|
# depends_on:
|
|
# postgres:
|
|
# condition: service_healthy
|
|
# elasticsearch:
|
|
# condition: service_healthy
|
|
# redis:
|
|
# condition: service_healthy
|
|
# kafka:
|
|
# condition: service_healthy
|
|
|
|
volumes:
|
|
postgres-data:
|
|
es-data:
|