Skip to content

log postgres-flex version on startup #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions cmd/start/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import (
"github.com/fly-apps/postgres-flex/internal/supervisor"
)

var version = "(devel)"

func main() {
log.Printf("Starting postgres-flex %s.", version)
log.SetFlags(0)

requiredPasswords := []string{"SU_PASSWORD", "OPERATOR_PASSWORD", "REPL_PASSWORD"}
Expand Down
4 changes: 3 additions & 1 deletion pg15/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ARG VERSION=custom

FROM golang:1.23

ARG VERSION

WORKDIR /go/src/github.com/fly-apps/fly-postgres
COPY . .

Expand All @@ -14,7 +16,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_monitor ./cmd/monitor
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_admin_server ./cmd/admin_server
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/flexctl ./cmd/flexctl

RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start ./cmd/start
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start -ldflags="-X main.version=${VERSION}" ./cmd/start

COPY ./bin/* /fly/bin/

Expand Down
4 changes: 3 additions & 1 deletion pg15/Dockerfile-timescaledb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ARG VERSION=custom

FROM golang:1.23

ARG VERSION

WORKDIR /go/src/github.com/fly-apps/fly-postgres
COPY . .

Expand All @@ -14,7 +16,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_monitor ./cmd/monitor
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_admin_server ./cmd/admin_server
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/flexctl ./cmd/flexctl

RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start ./cmd/start
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start -ldflags="-X main.version=${VERSION}" ./cmd/start

COPY ./bin/* /fly/bin/

Expand Down
4 changes: 3 additions & 1 deletion pg16/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ARG VERSION=custom

FROM golang:1.23 AS builder

ARG VERSION

WORKDIR /go/src/github.com/fly-apps/fly-postgres
COPY . .

Expand All @@ -13,7 +15,7 @@ RUN CGO_ENABLED=0 GOOS=linux \
go build -v -o /fly/bin/pg_unregister ./cmd/pg_unregister && \
go build -v -o /fly/bin/start_monitor ./cmd/monitor && \
go build -v -o /fly/bin/start_admin_server ./cmd/admin_server && \
go build -v -o /fly/bin/start ./cmd/start && \
go build -v -o /fly/bin/start -ldflags="-X main.version=${VERSION}" ./cmd/start && \
go build -v -o /fly/bin/flexctl ./cmd/flexctl


Expand Down
4 changes: 3 additions & 1 deletion pg16/Dockerfile-timescaledb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ARG VERSION=custom

FROM golang:1.23 AS builder

ARG VERSION

WORKDIR /go/src/github.com/fly-apps/fly-postgres
COPY . .

Expand All @@ -13,7 +15,7 @@ RUN CGO_ENABLED=0 GOOS=linux \
go build -v -o /fly/bin/pg_unregister ./cmd/pg_unregister && \
go build -v -o /fly/bin/start_monitor ./cmd/monitor && \
go build -v -o /fly/bin/start_admin_server ./cmd/admin_server && \
go build -v -o /fly/bin/start ./cmd/start && \
go build -v -o /fly/bin/start -ldflags="-X main.version=${VERSION}" ./cmd/start && \
go build -v -o /fly/bin/flexctl ./cmd/flexctl


Expand Down