Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 12/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/bfren/alpine-s6:alpine3.18-6.4.0
FROM quay.io/bfren/alpine-s6:alpine3.18-6.5.0

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql"

Expand Down
2 changes: 1 addition & 1 deletion 13/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/bfren/alpine-s6:alpine3.19-6.4.0
FROM quay.io/bfren/alpine-s6:alpine3.19-6.5.0

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql"

Expand Down
2 changes: 1 addition & 1 deletion 14/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/bfren/alpine-s6:alpine3.20-6.4.0
FROM quay.io/bfren/alpine-s6:alpine3.20-6.5.0

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql"

Expand Down
2 changes: 1 addition & 1 deletion 15/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/bfren/alpine-s6:alpine3.22-6.4.0
FROM quay.io/bfren/alpine-s6:alpine3.22-6.5.0

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql"

Expand Down
2 changes: 1 addition & 1 deletion 16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/bfren/alpine-s6:alpine3.24-6.4.0
FROM quay.io/bfren/alpine-s6:alpine3.24-6.5.0

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql"

Expand Down
2 changes: 1 addition & 1 deletion 17/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/bfren/alpine-s6:alpine3.24-6.4.0
FROM quay.io/bfren/alpine-s6:alpine3.24-6.5.0

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql"

Expand Down
2 changes: 1 addition & 1 deletion 18/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/bfren/alpine-s6:alpine3.24-6.4.0
FROM quay.io/bfren/alpine-s6:alpine3.24-6.5.0

LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql"

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.14
4.2.15
2 changes: 1 addition & 1 deletion generate-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

docker pull bfren/alpine

BASE_VERSION="6.4.0"
BASE_VERSION="6.5.0"
echo "Base: ${BASE_VERSION}"

POSTGRESQL_VERSIONS="12 13 14 15 16 17 18"
Expand Down
15 changes: 7 additions & 8 deletions overlay/etc/nu/scripts/bf-postgresql/mod.nu
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export module conf.nu
export module ctl.nu
export module db.nu
export module dump.nu
export module export.nu
export module import.nu
export module restore.nu
export module run.nu
export use conf.nu
export use ctl.nu
export use db.nu
export use dump.nu
export use export-db.nu
export use import.nu
export use restore.nu
22 changes: 0 additions & 22 deletions overlay/etc/nu/scripts/bf-postgresql/run.nu

This file was deleted.

40 changes: 27 additions & 13 deletions overlay/etc/s6-overlay/s6-rc.d/postgresql/run
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
#!/bin/withenv sh
#!/usr/bin/nu

set -euo pipefail
use bf
use bf-postgresql ["restore is_restoring"]
use bf-s6
bf env load

# Start PostgreSQL as the postgres user
def main [
name: string # The service name, passed by s6-supervise
] {
# set executable name - used to make log output more useful
bf env x_set --override run $name

#======================================================================================================================
# Run preflight checks
#======================================================================================================================
# run checks before executing service
if (restore is_restoring) {
let for = 5sec
bf write $"A backup is being restored so sleep for ($for)."
sleep $for

nu -c "use bf-postgresql run ; run preflight"
# exit cleanly - S6 will automatically restart the service
exit 0
}


#======================================================================================================================
# Run as PostgreSQL user
# -D path to the data directory
#======================================================================================================================

exec pg postgres -D "${BF_PG_DATA}"
# flags:
# -D path to the data directory
bf write "Starting PostgreSQL."
let args = [
"-D" (bf env PG_DATA)
]
bf-s6 svc launch s6-setuidgid postgres postgres ...$args
}
2 changes: 1 addition & 1 deletion overlay/usr/bin/bf/pg-export
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ bf env load -x
def main [
name: string # The name of the database to export
] {
$name | bf-postgresql export
$name | bf-postgresql export-db
}
Loading