This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from danicaceres1998/upgrade-packages-and-refa…
…ctor-code pgx/v5 & rds/csv integration & dockerization
- Loading branch information
Showing
16 changed files
with
707 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM golang:1.21.4-alpine AS build-stage | ||
|
||
WORKDIR /app | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
COPY ./ ./ | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./pgreplay ./cmd/pgreplay/main.go | ||
|
||
# Deploy the application binary into a lean image | ||
FROM alpine:latest | ||
RUN adduser -D pgreplay-user | ||
|
||
COPY --from=build-stage /app/pgreplay /bin/pgreplay | ||
|
||
USER pgreplay-user | ||
|
||
CMD [ "sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: "3" | ||
services: | ||
pgreplay: | ||
command: bash -c "while true; do sleep 10; done" | ||
build: | ||
context: ./ | ||
dockerfile: ./dev.dockerfile | ||
environment: | ||
PGHOST: postgres | ||
PGUSER: postgres | ||
volumes: | ||
- ./:/app | ||
expose: | ||
- 9445 | ||
|
||
postgres: | ||
image: postgres:15-alpine | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: users | ||
volumes: | ||
- postgres-db-volume:/var/lib/postgresql/data | ||
expose: | ||
- 5432 | ||
|
||
volumes: | ||
postgres-db-volume: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM golang:1.21.4 | ||
|
||
RUN apt update && apt -y upgrade | ||
RUN apt install -y make postgresql-client | ||
|
||
WORKDIR /app | ||
|
||
COPY ./ ./ | ||
RUN make bin/pgreplay.linux_amd64 | ||
|
||
EXPOSE 9445 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,46 @@ | ||
module github.com/gocardless/pgreplay-go | ||
|
||
go 1.21.1 | ||
go 1.21.4 | ||
|
||
require ( | ||
github.com/alecthomas/kingpin v2.2.6+incompatible | ||
github.com/alecthomas/kingpin/v2 v2.3.2 | ||
github.com/eapache/channels v1.1.0 | ||
github.com/go-kit/kit v0.13.0 | ||
github.com/jackc/pgx v3.6.2+incompatible | ||
github.com/go-kit/log v0.2.1 | ||
github.com/jackc/pgx/v5 v5.4.3 | ||
github.com/json-iterator/go v1.1.12 | ||
github.com/onsi/ginkgo v1.16.5 | ||
github.com/onsi/gomega v1.29.0 | ||
github.com/onsi/gomega v1.27.10 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/prometheus/client_golang v1.17.0 | ||
github.com/prometheus/client_golang v1.16.0 | ||
) | ||
|
||
require ( | ||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect | ||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
github.com/cockroachdb/apd v1.1.0 // indirect | ||
github.com/eapache/queue v1.1.0 // indirect | ||
github.com/fsnotify/fsnotify v1.7.0 // indirect | ||
github.com/go-kit/log v0.2.1 // indirect | ||
github.com/go-logfmt/logfmt v0.6.0 // indirect | ||
github.com/gofrs/uuid v4.4.0+incompatible // indirect | ||
github.com/google/go-cmp v0.6.0 // indirect | ||
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/lib/pq v1.10.9 // indirect | ||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect | ||
github.com/fsnotify/fsnotify v1.6.0 // indirect | ||
github.com/go-logfmt/logfmt v0.5.1 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/go-cmp v0.5.9 // indirect | ||
github.com/jackc/pgpassfile v1.0.0 // indirect | ||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect | ||
github.com/kr/text v0.1.0 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/nxadm/tail v1.4.11 // indirect | ||
github.com/prometheus/client_model v0.5.0 // indirect | ||
github.com/prometheus/common v0.45.0 // indirect | ||
github.com/prometheus/procfs v0.12.0 // indirect | ||
github.com/shopspring/decimal v1.3.1 // indirect | ||
golang.org/x/crypto v0.14.0 // indirect | ||
golang.org/x/net v0.17.0 // indirect | ||
golang.org/x/sys v0.13.0 // indirect | ||
github.com/nxadm/tail v1.4.8 // indirect | ||
github.com/prometheus/client_model v0.3.0 // indirect | ||
github.com/prometheus/common v0.42.0 // indirect | ||
github.com/prometheus/procfs v0.10.1 // indirect | ||
github.com/rogpeppe/go-internal v1.11.0 // indirect | ||
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect | ||
golang.org/x/crypto v0.13.0 // indirect | ||
golang.org/x/net v0.15.0 // indirect | ||
golang.org/x/sys v0.12.0 // indirect | ||
golang.org/x/text v0.13.0 // indirect | ||
google.golang.org/protobuf v1.31.0 // indirect | ||
golang.org/x/tools v0.13.0 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.