diff --git a/teable/docker-compose.yml b/teable/docker-compose.yml new file mode 100644 index 0000000..7c1e404 --- /dev/null +++ b/teable/docker-compose.yml @@ -0,0 +1,69 @@ +services: + teable: + image: registry.cn-shenzhen.aliyuncs.com/teable/teable:latest + restart: always + ports: + - '3000:3000' + volumes: + - teable-data:/app/.assets:rw + env_file: + - .env + environment: + - NEXT_ENV_IMAGES_ALL_REMOTE=true + networks: + - teable + depends_on: + teable-db: + condition: service_healthy + teable-cache: + condition: service_healthy + healthcheck: + test: ['CMD', 'curl', '-f', 'http://localhost:3000/health'] + start_period: 5s + interval: 5s + timeout: 3s + retries: 3 + + teable-db: + image: registry.cn-shenzhen.aliyuncs.com/teable/postgres:15.4 + restart: always + ports: + - '42345:5432' + volumes: + - teable-db:/var/lib/postgresql/data:rw + environment: + - POSTGRES_DB=${POSTGRES_DB} + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + networks: + - teable + healthcheck: + test: ['CMD-SHELL', "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"] + interval: 10s + timeout: 3s + retries: 3 + + teable-cache: + image: registry.cn-shenzhen.aliyuncs.com/teable/redis:7.2.4 + restart: always + expose: + - '6379' + volumes: + - teable-cache:/data:rw + networks: + - teable + command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD} + healthcheck: + test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping'] + interval: 10s + timeout: 3s + retries: 3 + +networks: + teable: + name: teable-network + +volumes: + teable-db: {} + teable-data: {} + teable-cache: {} \ No newline at end of file