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