Closed alberttwong closed 9 months ago
version: "3.9"
services:
starrocks:
image: starrocks/allin1-ubuntu
hostname: starrocks-fe
container_name: allin1-ubuntu
ports:
- 8030:8030
- 8040:8040
- 9030:9030
healthcheck:
test: bash -c "exec 6<> /dev/tcp/localhost/9030"
volumes:
- ./data:/home/data
starrocks-toolkit:
image: atwong/starrocks-tool-box
hostname: starrocks-toolkit
container_name: starrocks-toolkit
volumes:
- ./srtooldata:/home/data
depends_on:
starrocks:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mysql -P 9030 -h starrocks-fe -u root -e \"create database demo\";
exit 0;
"
I'd like to create a database on container startup or load a database with sample data on container startup. How would I do this? @kevincai