Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,27 @@ jobs:
cp .env.example .env
mkdir -p shared/db
cp shared/db/datamart.duckdb.example shared/db/datamart.duckdb
# The Superset container runs as uid 1000 and DuckDB opens the warehouse
# read-write, so the bind-mounted file and its directory (for the .wal)
# have to be writable by a user the runner does not share a uid with.
chmod a+rwx shared/db
chmod a+rw shared/db/datamart.duckdb

- name: Build images
run: docker compose build

- name: Start the stack
run: docker compose up --detach
run: |
set +e
docker compose up --detach
echo "::notice::compose up exit=$?"
set -e
echo "=== host-side file ==="
ls -ln shared/db/
echo "=== as seen inside superset ==="
docker compose exec -T superset id
docker compose exec -T superset ls -ln /app/superset_home/db/
echo "=== stored connection uri ==="
docker compose exec -T superset sh -lc "superset db-connection list 2>/dev/null || true"
echo "=== direct duckdb read_only open ==="
docker compose exec -T superset python -c "import duckdb; duckdb.connect('/app/superset_home/db/datamart.duckdb', read_only=True); print('read_only open OK')" || echo "read_only open FAILED"
echo "=== the post_start command by hand ==="
docker compose exec -T superset sh -lc 'superset import-dashboards -p ./dashboard.zip -u admin 2>&1 | tail -25; echo "exit=${PIPESTATUS[0]}"' || true

- name: Wait for services
run: |
Expand Down
3 changes: 2 additions & 1 deletion superset/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ RUN superset fab create-admin \
--password ${SUPERSET_PASSWORD}
RUN superset db upgrade
RUN superset init
RUN superset set_database_uri -d DW -u duckdb:///superset_home/db/datamart.duckdb
RUN superset set_database_uri -d DW \
-u "duckdb:///superset_home/db/datamart.duckdb?access_mode=read_only"
Loading