Skip to content

Commit

Permalink
Use docker healthcheck (#168)
Browse files Browse the repository at this point in the history
* Use docker healthcheck

Use a docker healthcheck with pg-isready instead of a custom bash script. It's just one thing less to maintain.

Also see:
- https://www.postgresql.org/docs/9.4/app-pg-isready.html
- https://docs.docker.com/engine/reference/builder/#healthcheck

* Set USER

This fixes the following error message.
```
Fix `FATAL:  role "root" does not exist`
```

Also see:
- https://docs.docker.com/engine/reference/builder/#user
- https://github.com/docker-library/postgres/blob/3bb4804/14/bullseye/Dockerfile#L23

* Use docker compose instead of docker-compose

* Update terraform SDK libs

Co-authored-by: Cyril Gaudin <cyril.gaudin@gmail.com>
  • Loading branch information
boekkooi-lengoo and cyrilgdn authored Jan 3, 2022
1 parent 0664d3a commit 37a092e
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 69 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ In order to run the full suite of Acceptance tests, run `make testacc`.

*Note:*
- Acceptance tests create real resources, and often cost money to run.
- If ran locally `docker-compose` needs to be in the `$PATH`

```sh
$ make testacc
Expand Down
41 changes: 16 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,61 @@ go 1.17

require (
github.com/blang/semver v3.5.1+incompatible
github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
github.com/lib/pq v1.9.0
github.com/sean-/postgresql-acl v0.0.0-20161225120419-d10489e5d217
gocloud.dev v0.21.0
)

require (
cloud.google.com/go v0.72.0 // indirect
cloud.google.com/go/storage v1.12.0 // indirect
contrib.go.opencensus.io/integrations/ocsql v0.1.7 // indirect
github.com/GoogleCloudPlatform/cloudsql-proxy v1.19.1 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg v1.0.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/aws/aws-sdk-go v1.36.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/wire v0.4.0 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-getter v1.5.3 // indirect
github.com/hashicorp/go-hclog v0.15.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/go-hclog v0.16.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.1 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/hashicorp/hc-install v0.3.1 // indirect
github.com/hashicorp/hcl/v2 v2.3.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.14.0 // indirect
github.com/hashicorp/terraform-json v0.12.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.4.0 // indirect
github.com/hashicorp/terraform-exec v0.15.0 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.5.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.2.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/klauspost/compress v1.11.3 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.4 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/zclconf/go-cty v1.8.4 // indirect
github.com/zclconf/go-cty v1.9.1 // indirect
go.opencensus.io v0.22.5 // indirect
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/mod v0.4.0 // indirect
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect
golang.org/x/net v0.0.0-20210326060303-6b1517762897 // indirect
golang.org/x/oauth2 v0.0.0-20201203001011-0b49973bad19 // indirect
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79 // indirect
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
golang.org/x/text v0.3.5 // indirect
golang.org/x/tools v0.0.0-20201203202102-a1a1cbeaa516 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.36.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20201203001206-6486ece9c497 // indirect
Expand Down
Loading

0 comments on commit 37a092e

Please sign in to comment.