Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

self-hosting: the CLI targets the v3 images

Carl-Gerhard Lindesvärd7318a9ca6e55
diff --git a/apps/public/content/docs/self-hosting/changelog.mdx b/apps/public/content/docs/self-hosting/changelog.mdx
index 4b7a6c9eb..9116bb61e 100644
--- a/apps/public/content/docs/self-hosting/changelog.mdx
+++ b/apps/public/content/docs/self-hosting/changelog.mdx
@@ -18,6 +18,7 @@ Before you do, stop sending events and let the old worker finish its queue. Even
TLDR;
+- Images move from `:2` to `:3` (`lindesvard/openpanel-api:3`, `lindesvard/openpanel-dashboard:3`)
- New `op-rp` (Redpanda) service, its `op-rp-data` volume and `redpanda/bootstrap.yaml`; `op-api` and `op-worker` wait for it
- `op-worker` now runs the `openpanel-api` image with `ROLE=worker` and a `/healthz/ready` healthcheck; `openpanel-worker` is no longer built
- `op-api` migrates with `prisma` and `scripts/migrate-code.ts` under bun
diff --git a/self-hosting/cli/test/doctor.test.ts b/self-hosting/cli/test/doctor.test.ts
index ac4125e7b..73fc2323f 100644
--- a/self-hosting/cli/test/doctor.test.ts
+++ b/self-hosting/cli/test/doctor.test.ts
@@ -29,6 +29,7 @@ describe('doctor on a v1 install', () => {
'upgrade/drain-old-queue',
'compose/redpanda-service',
'files/redpanda-bootstrap',
+ 'compose/image-tag',
'compose/worker-image',
'compose/worker-role',
'compose/worker-replicas',
@@ -59,6 +60,10 @@ describe('doctor on a v1 install', () => {
expect(compose.services['op-worker'].image).toBe(
compose.services['op-api'].image
);
+ expect(compose.services['op-api'].image).toBe('lindesvard/openpanel-api:3');
+ expect(compose.services['op-dashboard'].image).toBe(
+ 'lindesvard/openpanel-dashboard:3'
+ );
expect(compose.services['op-worker'].environment).toContain('ROLE=worker');
expect(compose.services['op-api'].command).toContain(
'scripts/migrate-code.ts'
diff --git a/self-hosting/docker-compose.template.yml b/self-hosting/docker-compose.template.yml
index e39546f7b..6e4f2cf56 100644
--- a/self-hosting/docker-compose.template.yml
+++ b/self-hosting/docker-compose.template.yml
@@ -122,7 +122,7 @@ services:
# - 19092:9092
op-api:
- image: lindesvard/openpanel-api:2
+ image: lindesvard/openpanel-api:3
restart: always
# Database migrations run here, before the api starts. The Prisma CLI is
# fetched at start (pinned to the version the image was built with), so
@@ -158,7 +158,7 @@ services:
max-file: "3"
op-dashboard:
- image: lindesvard/openpanel-dashboard:2
+ image: lindesvard/openpanel-dashboard:3
restart: always
depends_on:
op-api:
@@ -180,7 +180,7 @@ services:
# The worker is the api image started with ROLE=worker: it runs the queues,
# the scheduled jobs and the event consumer.
op-worker:
- image: lindesvard/openpanel-api:2
+ image: lindesvard/openpanel-api:3
restart: always
environment:
- ROLE=worker