From b38f12e60b90ea58e386dd15706c17f59db8c8e7 Mon Sep 17 00:00:00 2001 From: xiong Date: Tue, 4 Aug 2026 12:00:58 +0800 Subject: [PATCH] chore(dev): add PostgreSQL and Redis compose stack --- compose.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..d8418ba --- /dev/null +++ b/compose.yaml @@ -0,0 +1,39 @@ +name: tiku-dev + +services: + postgres: + image: postgres:18-alpine + restart: unless-stopped + environment: + POSTGRES_DB: ${TIKU_POSTGRES_DB:-tiku} + POSTGRES_USER: ${TIKU_POSTGRES_USER:-tiku} + POSTGRES_PASSWORD: ${TIKU_POSTGRES_PASSWORD:-tiku_dev} + ports: + - "127.0.0.1:${TIKU_POSTGRES_PORT:-5432}:5432" + volumes: + - postgres_data:/var/lib/postgresql + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] + interval: 5s + timeout: 5s + retries: 10 + start_period: 10s + + redis: + image: redis:7-alpine + restart: unless-stopped + command: ["redis-server", "--appendonly", "yes"] + ports: + - "127.0.0.1:${TIKU_REDIS_PORT:-6379}:6379" + volumes: + - redis_data:/data + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 3s + retries: 10 + start_period: 5s + +volumes: + postgres_data: + redis_data: