-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename compose.native variants to compose.all-in for clarity
- Loading branch information
Showing
3 changed files
with
231 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
services: | ||
############## THE APP ITSELF ############## | ||
app: | ||
build: | ||
context: . | ||
target: dev | ||
volumes: | ||
- .:/usr/local/app | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
AWS_ACCESS_KEY_ID: test | ||
AWS_SECRET_ACCESS_KEY: test | ||
AWS_REGION: us-east-1 | ||
AWS_ENDPOINT_URL: http://aws:4566 | ||
KAFKA_BOOTSTRAP_SERVERS: kafka:9093 | ||
INVENTORY_SERVICE_BASE_URL: http://mock-inventory:8080 | ||
PGHOST: postgres | ||
|
||
############## DATABASE AND VISUALIZER ############## | ||
postgres: | ||
image: postgres:17.1 | ||
# ports: | ||
# - "5432:5432" | ||
volumes: | ||
- ./dev/db:/docker-entrypoint-initdb.d | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: catalog | ||
|
||
pgadmin: | ||
image: dpage/pgadmin4:8.13.0 | ||
ports: | ||
- "5050:80" | ||
volumes: | ||
- ./dev/pgadmin/servers.json:/pgadmin4/servers.json | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: [email protected] | ||
PGADMIN_DEFAULT_PASSWORD: secret | ||
PGADMIN_CONFIG_SERVER_MODE: 'False' | ||
depends_on: | ||
- postgres | ||
|
||
############## LOCAL AWS ############## | ||
aws: | ||
image: localstack/localstack:3.8.1 | ||
ports: | ||
- "4566:4566" | ||
|
||
bucket-creator: | ||
image: localstack/localstack:3.8.1 | ||
entrypoint: [] | ||
command: awslocal --endpoint-url http://aws:4566 s3api create-bucket --bucket product-images | ||
depends_on: | ||
aws: | ||
condition: service_healthy | ||
|
||
############## MOCK INVENTORY SERVICE ############## | ||
mock-inventory: | ||
image: wiremock/wiremock:3.9.2 | ||
# ports: | ||
# - 8090:8080 | ||
volumes: | ||
- ./dev/inventory-mocks:/home/wiremock | ||
|
||
############## KAFKA AND VISUALIZATION ############## | ||
kafka: | ||
image: apache/kafka-native:3.9.0 | ||
environment: | ||
# Configure listeners for both docker and host communication | ||
KAFKA_LISTENERS: CONTROLLER://localhost:9091,HOST://0.0.0.0:9092,DOCKER://0.0.0.0:9093 | ||
KAFKA_ADVERTISED_LISTENERS: HOST://localhost:9092,DOCKER://kafka:9093 | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,DOCKER:PLAINTEXT,HOST:PLAINTEXT | ||
|
||
# Settings required for KRaft mode | ||
KAFKA_NODE_ID: 1 | ||
KAFKA_PROCESS_ROLES: broker,controller | ||
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER | ||
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9091 | ||
|
||
# Listener to use for broker-to-broker communication | ||
KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER | ||
|
||
# Required for a single node cluster | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
|
||
kafka-topic-creator: | ||
image: apache/kafka:3.9.0 | ||
command: /opt/kafka/bin/kafka-topics.sh --create --topic products --partitions 1 --replication-factor 1 --bootstrap-server kafka:9093 | ||
depends_on: | ||
- kafka | ||
|
||
kafka-ui: | ||
image: ghcr.io/kafbat/kafka-ui:01aa8ab36387c5f1d66d098e71488bfb0eb5f39c | ||
ports: | ||
- 8080:8080 | ||
environment: | ||
DYNAMIC_CONFIG_ENABLED: 'true' | ||
KAFKA_CLUSTERS_0_NAME: local | ||
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9093 | ||
depends_on: | ||
- kafka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
services: | ||
proxy: | ||
image: traefik:v3.1 | ||
command: --providers.docker --api.insecure | ||
ports: | ||
- "80:80" | ||
- "8080:8080" | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock" | ||
|
||
############## THE APP ITSELF ############## | ||
app: | ||
build: | ||
context: . | ||
target: dev | ||
volumes: | ||
- .:/usr/local/app | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
AWS_ACCESS_KEY_ID: test | ||
AWS_SECRET_ACCESS_KEY: test | ||
AWS_REGION: us-east-1 | ||
AWS_ENDPOINT_URL: http://aws:4566 | ||
KAFKA_BOOTSTRAP_SERVERS: kafka:9093 | ||
INVENTORY_SERVICE_BASE_URL: http://mock-inventory:8080 | ||
PGHOST: postgres | ||
|
||
############## DATABASE AND VISUALIZER ############## | ||
postgres: | ||
image: postgres:17.1 | ||
volumes: | ||
- ./dev/db:/docker-entrypoint-initdb.d | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: catalog | ||
|
||
pgadmin: | ||
image: dpage/pgadmin4:8.13.0 | ||
volumes: | ||
- ./dev/pgadmin/servers.json:/pgadmin4/servers.json | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: [email protected] | ||
PGADMIN_DEFAULT_PASSWORD: secret | ||
PGADMIN_CONFIG_SERVER_MODE: 'False' | ||
depends_on: | ||
- postgres | ||
labels: | ||
traefik.http.routers.pgadmin.rule: Host(`pgadmin.localhost`) | ||
traefik.http.services.pgadmin.loadbalancer.server.port: 80 | ||
|
||
############## LOCAL AWS ############## | ||
aws: | ||
image: localstack/localstack:3.8.1 | ||
labels: | ||
traefik.http.routers.aws.rule: Host(`aws.localhost`) | ||
traefik.http.services.aws.loadbalancer.server.port: 4566 | ||
|
||
bucket-creator: | ||
image: localstack/localstack:3.8.1 | ||
entrypoint: [] | ||
command: awslocal --endpoint-url http://aws:4566 s3api create-bucket --bucket product-images | ||
depends_on: | ||
aws: | ||
condition: service_healthy | ||
|
||
############## MOCK INVENTORY SERVICE ############## | ||
mock-inventory: | ||
image: wiremock/wiremock:3.9.2 | ||
volumes: | ||
- ./dev/inventory-mocks:/home/wiremock | ||
labels: | ||
traefik.http.routers.mock-inventory.rule: Host(`inventory.localhost`) | ||
traefik.http.services.mock-inventory.loadbalancer.server.port: 8080 | ||
|
||
############## KAFKA AND VISUALIZATION ############## | ||
kafka: | ||
image: apache/kafka-native:3.9.0 | ||
environment: | ||
# Configure listeners for both docker and host communication | ||
KAFKA_LISTENERS: CONTROLLER://localhost:9091,HOST://0.0.0.0:9092,DOCKER://0.0.0.0:9093 | ||
KAFKA_ADVERTISED_LISTENERS: HOST://localhost:9092,DOCKER://kafka:9093 | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,DOCKER:PLAINTEXT,HOST:PLAINTEXT | ||
|
||
# Settings required for KRaft mode | ||
KAFKA_NODE_ID: 1 | ||
KAFKA_PROCESS_ROLES: broker,controller | ||
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER | ||
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9091 | ||
|
||
# Listener to use for broker-to-broker communication | ||
KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER | ||
|
||
# Required for a single node cluster | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
|
||
kafka-topic-creator: | ||
image: apache/kafka:3.9.0 | ||
command: /opt/kafka/bin/kafka-topics.sh --create --topic products --partitions 1 --replication-factor 1 --bootstrap-server kafka:9093 | ||
depends_on: | ||
- kafka | ||
|
||
kafka-ui: | ||
image: ghcr.io/kafbat/kafka-ui:01aa8ab36387c5f1d66d098e71488bfb0eb5f39c | ||
environment: | ||
DYNAMIC_CONFIG_ENABLED: 'true' | ||
KAFKA_CLUSTERS_0_NAME: local | ||
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9093 | ||
depends_on: | ||
- kafka | ||
labels: | ||
traefik.http.routers.kafka-ui.rule: Host(`kafka.localhost`) | ||
traefik.http.services.kafka-ui.loadbalancer.server.port: 8080 |