Skip to content

Commit

Permalink
e2e: mount volumes to temp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
634750802 committed Aug 15, 2024
1 parent 301fcff commit ab84128
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ services:
tidb:
image: wangdi4zm/tind:v7.5.3-vector-index
restart: always
volumes:
- ${E2E_DATA_TIDB_DIR:-.data/tidb}:/app/data

redis:
image: redis:6.0.16
restart: always
volumes:
- ${E2E_DATA_REDIS_DIR:-.data/redis}:/data

backend:
image: tidbai/backend:${E2E_DOCKER_TAG}
Expand All @@ -18,6 +22,8 @@ services:
- "5000:80"
env_file:
- .env.compose
volumes:
- ${E2E_DATA_STORAGE_DIR:-.data/storage}:/shared/data
logging:
driver: json-file
options:
Expand Down Expand Up @@ -49,6 +55,8 @@ services:
env_file:
- .env.compose
command: /usr/bin/supervisord
volumes:
- ${E2E_DATA_STORAGE_DIR:-.data/storage}:/shared/data
logging:
driver: json-file
options:
Expand Down
8 changes: 8 additions & 0 deletions e2e/start-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ function clean_up {

trap clean_up EXIT

echo -e "$TAG Creating temp dir"
export E2E_DATA_STORAGE_DIR=$(mktemp -d -t tidbai-storage)
export E2E_DATA_REDIS_DIR=$(mktemp -d -t tidbai-redis)
export E2E_DATA_TIDB_DIR=$(mktemp -d -t tidbai-tidb)
echo E2E_DATA_STORAGE_DIR: ${E2E_DATA_STORAGE_DIR}
echo E2E_DATA_REDIS_DIR: ${E2E_DATA_REDIS_DIR}
echo E2E_DATA_TIDB_DIR: ${E2E_DATA_TIDB_DIR}

echo -e "$TAG Starting TiDB"
docker compose up -d tidb

Expand Down

0 comments on commit ab84128

Please sign in to comment.