generated from PenaSide/GolangTemplate
compose fixes
This commit is contained in:
parent
6c1792f023
commit
b2417d9100
@ -39,24 +39,23 @@ services:
|
||||
- 8082:8000
|
||||
- 9092:9000
|
||||
depends_on:
|
||||
- customer-db
|
||||
- customer-migration
|
||||
- redpanda
|
||||
customer-db:
|
||||
condition: service_started
|
||||
customer-migration:
|
||||
condition: service_completed_successfully
|
||||
redpanda:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- test
|
||||
|
||||
customer-migration:
|
||||
container_name: customer-migration
|
||||
build:
|
||||
context: ../../.
|
||||
dockerfile: Dockerfile
|
||||
target: test
|
||||
command:
|
||||
[
|
||||
"sh",
|
||||
"-c",
|
||||
'migrate -source file://migrations -database "mongodb://test:test@customer-db:27017/admin?authSource=admin" up',
|
||||
]
|
||||
image: alpine
|
||||
command: migrate -source file://migrations -database "mongodb://test:test@customer-db:27017/admin" up
|
||||
volumes:
|
||||
- ../../migrations/test:/app/migrations:ro
|
||||
- ../../tools/migrate:/usr/local/bin/migrate:ro
|
||||
working_dir: /app
|
||||
depends_on:
|
||||
- customer-db
|
||||
networks:
|
||||
@ -105,17 +104,18 @@ services:
|
||||
networks:
|
||||
- test
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "rpk cluster health | grep -E 'Healthy:.+true' || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 3s
|
||||
test: rpk cluster health | grep -q 'Healthy:.*true'
|
||||
interval: 2s
|
||||
timeout: 2s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
|
||||
console:
|
||||
tty: true
|
||||
container_name: customer-console
|
||||
image: docker.redpanda.com/redpandadata/console:v2.2.4
|
||||
entrypoint: /bin/sh
|
||||
command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console"
|
||||
entrypoint: ''
|
||||
command: sh -c 'echo "$$CONSOLE_CONFIG_FILE" > /tmp/config.yml && exec /app/console'
|
||||
environment:
|
||||
CONFIG_FILEPATH: /tmp/config.yml
|
||||
CONSOLE_CONFIG_FILE: |
|
||||
@ -172,4 +172,4 @@ services:
|
||||
CONNECT_LOG_LEVEL: info
|
||||
|
||||
networks:
|
||||
test:
|
||||
test:
|
||||
|
0
tools/migrate
Normal file → Executable file
0
tools/migrate
Normal file → Executable file
Loading…
Reference in New Issue
Block a user