Skip to content
Merged
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
21 changes: 19 additions & 2 deletions .github/workflows/reusable-ruby-publish-migrated-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,25 @@ jobs:
done
'

cat <<'EOF' > /tmp/99-data-path.xml
<clickhouse>
<path>/data/</path>
<tmp_path>/data/tmp/</tmp_path>
<user_files_path>/data/user_files/</user_files_path>
<format_schema_path>/data/format_schemas/</format_schema_path>
</clickhouse>
EOF
docker cp /tmp/99-data-path.xml clickhouse:/etc/clickhouse-server/config.d/99-data-path.xml
docker exec clickhouse mkdir -p /data/tmp /data/user_files /data/format_schemas
docker exec clickhouse chown -R clickhouse:clickhouse /data
docker restart clickhouse

timeout 20s bash -c '
until curl -fsS http://localhost:8123/ping | grep -qx "Ok."; do
sleep 1
done
'

- name: Run clickhouse migrations
run: |
bundle exec rake clickhouse:create
Expand All @@ -219,8 +238,6 @@ jobs:
REPOSITORY_OWNER: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker exec clickhouse cp -r /var/lib/clickhouse/. /data/
docker exec clickhouse sed -i 's|<path>/var/lib/clickhouse</path>|<path>/data</path>|g' /etc/clickhouse-server/config.xml
docker stop clickhouse
echo $GITHUB_TOKEN | docker login ghcr.io -u $REPOSITORY_OWNER --password-stdin
docker commit clickhouse ghcr.io/personaclick/clickhouse-migrated:latest
Expand Down
Loading