Skip to content

Commit

Permalink
fix: docker compose kafka example
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Oct 28, 2024
1 parent d328f65 commit 6083480
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ go.work*
node_modules
dist
vendor
worktrees
worktrees
dumps
14 changes: 10 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: '3.8'

volumes:
postgres: {}

services:

postgres:
Expand All @@ -10,12 +13,15 @@ services:
timeout: 5s
retries: 5
command:
- -c
- max_connections=200
- -c
- max_connections=200
environment:
POSTGRES_USER: "ledger"
POSTGRES_PASSWORD: "ledger"
POSTGRES_DB: "ledger"
PGDATA: /data/postgres
volumes:
- ${POSTGRES_DATA:-postgres}:/data/postgres

prometheus:
image: prom/prometheus:latest
Expand All @@ -40,9 +46,9 @@ services:
image: golang:1.22-alpine
entrypoint: go run main.go serve
volumes:
- .:/src
- .:/src
ports:
- 3068:3068
- 3068:3068
working_dir: /src
depends_on:
postgres:
Expand Down
6 changes: 4 additions & 2 deletions examples/publisher-kafka/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ services:
extends:
file: ../../docker-compose.yml
service: postgres
jaeger:
extends:
file: ../../docker-compose.yml
service: jaeger
ledger:
extends:
file: ../../docker-compose.yml
service: ledger
depends_on:
- postgres
- kafka
image: golang:1.19-alpine
entrypoint: go run main.go serve
volumes:
- ../..:/src
working_dir: /src
Expand Down

0 comments on commit 6083480

Please sign in to comment.