window run docker-desktop docker-compose -f docker-compose.infra.yaml up
Opened this issue · 1 comments
Report
pezzo-clickhouse-migrate-1 | TableCompilerClickHouse.createQuery: create table reports
(id
String, timestamp
DateTime, environment
String, organizationId
String, projectId
String, promptTokens
Float64, completionTokens
Float64, totalTokens
Float64, promptCost
Float64, completionCost
Float64, totalCost
Float64, duration
UInt32, type
String, client
String, clientVersion
String, model
String, provider
String, modelAuthor
String, requestTimestamp
DateTime, requestBody
String, isError
boolean, responseStatusCode
UInt32, responseTimestamp
DateTime, responseBody
String, cacheEnabled
boolean, cacheHit
boolean) engine = MergeTree ORDER BY tuple()
pezzo-clickhouse-migrate-1 | migration file "20231231065935_create_reports.ts" failed
pezzo-clickhouse-migrate-1 | migration failed with error: insert into knex_migrations
(batch
, migration_time
, name
) values (1, '2024-03-07 08:05:37', '20231231065935_create_reports.ts') - 500: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in rename: Permission denied ["/var/lib/clickhouse/store/17f/17f0a7f9-a863-4ce7-98d2-75f40e2226f4/tmp_insert_all_1_1_0/"] ["/var/lib/clickhouse/store/17f/17f0a7f9-a863-4ce7-98d2-75f40e2226f4/all_1_1_0/"]
pezzo-clickhouse-migrate-1 | Cannot print extra info for Poco::Exception (version 23.12.4.15 (official build))
pezzo-clickhouse-migrate-1 |
pezzo-clickhouse-migrate-1 | insert into knex_migrations
(batch
, migration_time
, name
) values (1, '2024-03-07 08:05:37', '20231231065935_create_reports.ts') - 500: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in rename: Permission denied ["/var/lib/clickhouse/store/17f/17f0a7f9-a863-4ce7-98d2-75f40e2226f4/tmp_insert_all_1_1_0/"] ["/var/lib/clickhouse/store/17f/17f0a7f9-a863-4ce7-98d2-75f40e2226f4/all_1_1_0/"]
pezzo-clickhouse-migrate-1 | Cannot print extra info for Poco::Exception (version 23.12.4.15 (official build))
pezzo-clickhouse-migrate-1 |
pezzo-clickhouse-migrate-1 | Error: insert into knex_migrations
(batch
, migration_time
, name
) values (1, '2024-03-07 08:05:37', '20231231065935_create_reports.ts') - 500: std::exception.
Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in rename: Permission denied ["/var/lib/clickhouse/store/17f/17f0a7f9-a863-4ce7-98d2-75f40e2226f4/tmp_insert_all_1_1_0/"] ["/var/lib/clickhouse/store/17f/17f0a7f9-a863-4ce7-98d2-75f40e2226f4/all_1_1_0/"]
pezzo-clickhouse-migrate-1 | Cannot print extra info for Poco::Exception (version 23.12.4.15 (official build))
pezzo-clickhouse-migrate-1 |
pezzo-clickhouse-migrate-1 | at getErrorObj (/app/clickhouse/node_modules/clickhouse/index.js:231:14)
pezzo-clickhouse-migrate-1 | at Request._callback (/app/clickhouse/node_modules/clickhouse/index.js:610:6)
pezzo-clickhouse-migrate-1 | at Request.self.callback (/app/clickhouse/node_modules/request/request.js:185:22)
pezzo-clickhouse-migrate-1 | at Request.emit (node:events:513:28)
pezzo-clickhouse-migrate-1 | at Request.emit (node:domain:489:12)
pezzo-clickhouse-migrate-1 | at Request. (/app/clickhouse/node_modules/request/request.js:1161:10)
pezzo-clickhouse-migrate-1 | at Request.emit (node:events:513:28)
pezzo-clickhouse-migrate-1 | at Request.emit (node:domain:489:12)
pezzo-clickhouse-migrate-1 | at IncomingMessage. (/app/clickhouse/node_modules/request/request.js:1083:12)
pezzo-clickhouse-migrate-1 | at Object.onceWrapper (node:events:627:28)
pezzo-clickhouse-migrate-1 | npm notice
pezzo-clickhouse-migrate-1 | npm notice New major version of npm available! 8.19.2 -> 10.5.0
pezzo-clickhouse-migrate-1 | npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0
pezzo-clickhouse-migrate-1 | npm notice Run npm install -g npm@10.5.0
to update!
pezzo-clickhouse-migrate-1 | npm notice
pezzo-clickhouse-migrate-1 | Error running knex migrations
Expected behavior
docker-compose -f docker-compose.infra.yaml up
Steps to reproduce the problem
- docker-compose -f docker-compose.infra.yaml up
Logs (if applicable)
example
Pezzo version
No response
How do you use Pezzo?
Docker Compose
version: "3"
services:
pezzo-clickhouse-migrate:
image: ghcr.io/pezzolabs/pezzo/server:latest
build:
context: .
dockerfile: ./apps/server/Dockerfile
entrypoint: /bin/sh
working_dir: /app/clickhouse
command: -c "./migrate.sh"
user: root
environment:
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: "8123"
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: default
depends_on:
clickhouse:
condition: service_healthy
pezzo-prisma-migrate:
image: ghcr.io/pezzolabs/pezzo/server:latest
build:
context: .
dockerfile: ./apps/server/Dockerfile
entrypoint: /bin/sh
command: -c "npx prisma migrate deploy"
environment:
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/pezzo
depends_on:
postgres:
condition: service_healthy
clickhouse:
image: clickhouse/clickhouse-server:23.1.2.9-alpine
environment:
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: default
volumes:
- clickhouse_data:/var/lib/clickhouse
- clickhouse_logs:/var/log/clickhouse-server
- ./clickhouse/config/users.d/config.xml:/etc/clickhouse-server/users.d/config.xml
- ./clickhouse/config/config.d/config.xml:/etc/clickhouse-server/config.d/config.xml
ports:
- "8123:8123"
- "9000:9000"
- "9004:9004"
healthcheck:
test: ["CMD-SHELL", 'clickhouse-client --query "SELECT 1"']
interval: 5s
timeout: 5s
retries: 3
postgres:
image: postgres:15-alpine3.17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 3
supertokens:
image: supertokens/supertokens-postgresql:5.0
ports:
- "3567:3567"
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRES_CONNECTION_URI: postgres://postgres:postgres@postgres:5432/supertokens
healthcheck:
test: >
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
redis-stack-server:
image: redis/redis-stack-server:7.2.0-v0
container_name: redis-stack-server
ports:
- "6379:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
local-kms:
image: nsmithuk/local-kms:latest
container_name: local-kms
entrypoint: "/bin/sh"
# Seeding the local-kms with a master key. "/init/seed.yaml" will be created based on the base64 encoded string below.
command: '-c "echo "S2V5czoKICBTeW1tZXRyaWM6CiAgICBBZXM6CiAgICAgIC0gTWV0YWRhdGE6CiAgICAgICAgICBLZXlJZDogZGVtby1tYXN0ZXIta2V5CiAgICAgICAgQmFja2luZ0tleXM6CiAgICAgICAgICAtIDVjZGFlYWQyN2ZlN2RhMmRlNDc5NDVkNzNjZDZkNzllMzY0OTRlNzM4MDJmM2NkMzg2OWYxZDJjYjBiNWQ3YTkKCkFsaWFzZXM6CiAgLSBBbGlhc05hbWU6IGFsaWFzL3Rlc3RpbmcKICAgIFRhcmdldEtleUlkOiBkZW1vLW1hc3Rlci1rZXk=" | base64 -d >> /init/seed.yaml && local-kms"'
ports:
- "9981:9981"
expose:
- "9981"
environment:
- "PORT=9981"
- "KMS_REGION=us-east-1"
volumes:
postgres_data: ~
clickhouse_data: ~
clickhouse_logs: ~