Skip to content

Commit

Permalink
feat: pgclient16
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed Feb 20, 2024
1 parent dd7e2bc commit 8cfcf9e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
RUN apt-get update && apt-get install -y postgresql-client-13 postgresql-client-14 postgresql-client-15 postgresql-client-16
2 changes: 1 addition & 1 deletion packages/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function AddBackup({
s3Path: "",
cron: "0 2 * * *",
// Additionals
pgVersion: "15",
pgVersion: "16",
pgCompressionLevel: 9,
pgFormat: "custom",
encryptionKey: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const skeletonRows: z.infer<ReturnType<typeof getDatabaseBackupsResponseSchema>>
s3Endpoint: "",
s3Path: "",
cron: "",
pgVersion: "15",
pgVersion: "16",
pgCompressionLevel: 0,
pgFormat: "custom",
retention: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ReturnType<typeof formSchema>>["pgVersion"]) ?? "15",
pgVersion: (backup.data?.backup.pgVersion as z.infer<ReturnType<typeof formSchema>>["pgVersion"]) ?? "16",
pgCompressionLevel: backup.data?.backup.pgCompressionLevel ?? 9,
pgFormat: (backup.data?.backup.pgFormat as z.infer<ReturnType<typeof formSchema>>["pgFormat"]) ?? "custom",
encryptionKey: "",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/types/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion packages/cron/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion packages/lib/backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 8cfcf9e

Please sign in to comment.