Skip to content

Commit

Permalink
Create docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
donggook-me authored May 23, 2024
1 parent 6dad6bc commit ed397a7
Showing 1 changed file with 111 additions and 0 deletions.
111 changes: 111 additions & 0 deletions src/server/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
version: '1'

services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ports:
- "22181:2181"

kafka:
image: confluentinc/cp-kafka:latest
restart: 'always'
depends_on:
- zookeeper
ports:
- "29092:29092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
logging:
driver: journald
options:
tag: mytag

kafka-ui:
image: provectuslabs/kafka-ui
container_name: kafka-ui
ports:
- "8989:8080"
restart: always
environment:
- KAFKA_CLUSTERS_0_NAME=local
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:29092
- KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper-1:22181

ksqldb-server:
image: confluentinc/ksqldb-server:0.29.0
hostname: ksqldb-server
container_name: ksqldb-server
ports:
- "8088:8088"
environment:
KSQL_LISTENERS: http://0.0.0.0:8088
KSQL_BOOTSTRAP_SERVERS: kafka:9092
KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: "true"
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: "true"
depends_on:
- kafka

ksqldb-cli:
image: confluentinc/ksqldb-cli:0.29.0
container_name: ksqldb-cli
depends_on:
- ksqldb-server
entrypoint: /bin/sh
tty: true

mysql:
image: mysql:8
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: advt

redis-docker:
image: redis:latest
command: redis-server --port 6379
container_name: "docker-redis"
labels:
- "name=redis"
- "mode=standalone"
ports:
- 6379:6379
networks:
- eum-test

app:
container_name: spring-boot-app
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
ports:
- "8080:8080"
depends_on:
- redis-docker
environment:
SPRING_DATASOURCE_URL : ${MYSQL_URL}
SPRING_DATASOURCE_USERNAME: ${MYSQL_USER}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_PW}
networks:
- eum-test
logging:
driver: "json-file"
options:
max-size: "10m"

networks:
eum-test

0 comments on commit ed397a7

Please sign in to comment.