From 8cfcf9e74b7a21b6ed25244c39a7e97f60c0c4ba Mon Sep 17 00:00:00 2001 From: rharkor Date: Tue, 20 Feb 2024 19:06:12 +0100 Subject: [PATCH] feat: pgclient16 --- .devcontainer/Dockerfile | 2 +- packages/app/Dockerfile | 2 +- packages/app/src/app/[lang]/(protected)/dbackup/add-backup.tsx | 2 +- packages/app/src/app/[lang]/(protected)/dbackup/backups.tsx | 2 +- .../app/src/app/[lang]/(protected)/dbackup/update-backup.tsx | 2 +- packages/app/src/types/constants.ts | 2 +- packages/cron/Dockerfile | 2 +- packages/lib/backup.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index eb858500..277613b6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -18,4 +18,4 @@ RUN /bin/bash -c "curl -fsSL https://bun.sh/install | bash" # Install pg_dump RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/postgres.list RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - -RUN apt-get update && apt-get install -y postgresql-client-13 postgresql-client-14 postgresql-client-15 \ No newline at end of file +RUN apt-get update && apt-get install -y postgresql-client-13 postgresql-client-14 postgresql-client-15 postgresql-client-16 \ No newline at end of file diff --git a/packages/app/Dockerfile b/packages/app/Dockerfile index 88d8e3db..d8ec0959 100644 --- a/packages/app/Dockerfile +++ b/packages/app/Dockerfile @@ -46,7 +46,7 @@ COPY --from=builder /usr/src/app . # Install pg_dump RUN echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/postgres.list RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - -RUN apt-get update && apt-get install -y postgresql-client-13 postgresql-client-14 postgresql-client-15 +RUN apt-get update && apt-get install -y postgresql-client-13 postgresql-client-14 postgresql-client-15 postgresql-client-16 EXPOSE 3000 diff --git a/packages/app/src/app/[lang]/(protected)/dbackup/add-backup.tsx b/packages/app/src/app/[lang]/(protected)/dbackup/add-backup.tsx index c54e0a30..f13aa507 100644 --- a/packages/app/src/app/[lang]/(protected)/dbackup/add-backup.tsx +++ b/packages/app/src/app/[lang]/(protected)/dbackup/add-backup.tsx @@ -60,7 +60,7 @@ export default function AddBackup({ s3Path: "", cron: "0 2 * * *", // Additionals - pgVersion: "15", + pgVersion: "16", pgCompressionLevel: 9, pgFormat: "custom", encryptionKey: "", diff --git a/packages/app/src/app/[lang]/(protected)/dbackup/backups.tsx b/packages/app/src/app/[lang]/(protected)/dbackup/backups.tsx index 2be96c6b..9e463253 100644 --- a/packages/app/src/app/[lang]/(protected)/dbackup/backups.tsx +++ b/packages/app/src/app/[lang]/(protected)/dbackup/backups.tsx @@ -49,7 +49,7 @@ const skeletonRows: z.infer> s3Endpoint: "", s3Path: "", cron: "", - pgVersion: "15", + pgVersion: "16", pgCompressionLevel: 0, pgFormat: "custom", retention: 0, diff --git a/packages/app/src/app/[lang]/(protected)/dbackup/update-backup.tsx b/packages/app/src/app/[lang]/(protected)/dbackup/update-backup.tsx index c034d803..56784bd4 100644 --- a/packages/app/src/app/[lang]/(protected)/dbackup/update-backup.tsx +++ b/packages/app/src/app/[lang]/(protected)/dbackup/update-backup.tsx @@ -71,7 +71,7 @@ export default function UpdateBackup({ s3Path: backup.data?.backup.s3Path ?? "", cron: backup.data?.backup.cron ?? "0 2 * * *", // Additionals - pgVersion: (backup.data?.backup.pgVersion as z.infer>["pgVersion"]) ?? "15", + pgVersion: (backup.data?.backup.pgVersion as z.infer>["pgVersion"]) ?? "16", pgCompressionLevel: backup.data?.backup.pgCompressionLevel ?? 9, pgFormat: (backup.data?.backup.pgFormat as z.infer>["pgFormat"]) ?? "custom", encryptionKey: "", diff --git a/packages/app/src/types/constants.ts b/packages/app/src/types/constants.ts index f434533b..e19bc94e 100644 --- a/packages/app/src/types/constants.ts +++ b/packages/app/src/types/constants.ts @@ -10,7 +10,7 @@ export const resendEmailVerificationExpiration = 1000 * 60 * 2 // 5 minutes export const defaultMaxPerPage = 100 export const maxUploadSize = 1024 * 1024 * 10 // 10 MB -export const postgresVersion = ["13", "14", "15"] as const +export const postgresVersion = ["13", "14", "15", "16"] as const export const postgresFormat = ["custom", "directory", "tar", "plain"] as const export const sectionClassName = "container m-auto flex flex-1 flex-col gap-4 p-2 py-4" diff --git a/packages/cron/Dockerfile b/packages/cron/Dockerfile index 01cefb11..143737e7 100644 --- a/packages/cron/Dockerfile +++ b/packages/cron/Dockerfile @@ -29,6 +29,6 @@ RUN cd packages/app && npx prisma generate # Install pg_dump RUN echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/postgres.list RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - -RUN apt-get update && apt-get install -y postgresql-client-13 postgresql-client-14 postgresql-client-15 +RUN apt-get update && apt-get install -y postgresql-client-13 postgresql-client-14 postgresql-client-15 postgresql-client-16 CMD ["npm", "start", "-w", "packages/cron"] \ No newline at end of file diff --git a/packages/lib/backup.ts b/packages/lib/backup.ts index 56f225e6..ef3e03c7 100644 --- a/packages/lib/backup.ts +++ b/packages/lib/backup.ts @@ -26,7 +26,7 @@ export const dumpOptionsSchema = z.object({ PGUSER: z.string(), PGDATABASE: z.string(), PGPASSWORD: z.string(), - PG_VERSION: z.enum(["13", "14", "15"]), + PG_VERSION: z.enum(["13", "14", "15", "16"]), PG_COMPRESSION_LEVEL: z.number().min(0).max(9), PG_FORMAT: z.enum(["custom", "directory", "tar", "plain"]), ENCRYPTION_KEY: z.string().nullable(),