feat: replace onebox ingress with SmartProxy
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { BaseMigration } from './base-migration.ts';
|
||||
import type { TQueryFunction } from '../types.ts';
|
||||
|
||||
export class Migration015SmartProxyPlatformService extends BaseMigration {
|
||||
readonly version = 15;
|
||||
readonly description = 'Rename Caddy platform service to SmartProxy';
|
||||
|
||||
up(query: TQueryFunction): void {
|
||||
query(
|
||||
`UPDATE platform_services
|
||||
SET name = 'onebox-smartproxy',
|
||||
type = 'smartproxy',
|
||||
container_id = CASE
|
||||
WHEN container_id = 'onebox-caddy' THEN 'onebox-smartproxy'
|
||||
ELSE container_id
|
||||
END,
|
||||
config = ?,
|
||||
updated_at = ?
|
||||
WHERE type = 'caddy'`,
|
||||
[
|
||||
JSON.stringify({
|
||||
image: 'code.foss.global/host.today/ht-docker-smartproxy:latest',
|
||||
port: 80,
|
||||
volumes: [],
|
||||
environment: {},
|
||||
}),
|
||||
Date.now(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user