51 lines
1 KiB
YAML
51 lines
1 KiB
YAML
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg17
|
|
environment:
|
|
POSTGRES_DB: mydatabase
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: password
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U user -d mydatabase"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
platform: linux/arm64
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
cli:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: go-b2b-starter-cli
|
|
volumes:
|
|
- ../:/workspace
|
|
working_dir: /workspace
|
|
environment:
|
|
- POSTGRES_HOST=postgres
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=mydatabase
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|