Skip to content
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

Add PostgreSQL 16 #38

Merged
merged 1 commit into from
Mar 19, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/pr-postgres-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- examples/13
- examples/14
- examples/15
- examples/16
- examples/custom
steps:

Expand Down
2 changes: 1 addition & 1 deletion .lando.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lando-postgres-plugin
services:
node:
type: node:14
type: node:18
build:
- npm install
scanner: false
Expand Down
3 changes: 2 additions & 1 deletion builders/postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ module.exports = {
name: 'postgres',
config: {
version: '10',
supported: ['15', '14', '13', '12', '11', '11.1', '11.0', '10', '10.6.0', '9.6'],
supported: ['16', '15', '14', '13', '12', '11', '11.1', '11.0', '10', '10.6.0', '9.6'],
pinPairs: {
'16': 'bitnami/postgresql:16.2.0-debian-12-r8',
'15': 'bitnami/postgresql:15.2.0-debian-11-r26',
'14': 'bitnami/postgresql:14.1.0-debian-10-r9',
'13': 'bitnami/postgresql:13.5.0-debian-10-r9',
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:

## Supported versions

* [16](https://hub.docker.com/r/bitnami/postgresql)
* [15](https://hub.docker.com/r/bitnami/postgresql)
* [14](https://hub.docker.com/r/bitnami/postgresql)
* [13](https://hub.docker.com/r/bitnami/postgresql)
* [12](https://hub.docker.com/r/bitnami/postgresql)
Expand Down
22 changes: 22 additions & 0 deletions examples/16/.lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: lando-postgres-16
services:
defaults:
type: postgres:16
cross:
type: postgres:16
portforward: true
tooling:
healthcheckdefaults:
service: defaults
cmd: psql -U postgres -c "\\l"
verifydefaultsdatabase:
service: defaults
cmd: psql -P pager=off -U postgres -c "\dt *.*"
crossconnect:
service: defaults
cmd: psql -P pager=off -h cross -U postgres -c "\dt *.*"

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/postgres": ./../../
47 changes: 47 additions & 0 deletions examples/16/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Postgres Example
================

This example exists primarily to test the following documentation:

* [Postgres Service](https://docs.devwithlando.io/tutorials/postgres.html)

Start up tests
--------------

Run the following commands to get up and running with this example.

```bash
# Should start up successfully
lando poweroff
lando start
```

Verification commands
---------------------

Run the following commands to validate things are rolling as they should.

```bash
# Should use 16 as the specified version
lando ssh -s defaults -c "psql -V" | grep "16"

# Should see the default database on healthcheck
lando healthcheckdefaults | grep 'database'

# Should use the correct default user pass db
lando verifydefaultsdatabase | grep 'pg_database'

# Should be able to receive connections from the outside
lando crossconnect | grep 'pg_database'
```

Destroy tests
-------------

Run the following commands to trash this app like nothing ever happened.

```bash
# Should be destroyed with success
lando destroy -y
lando poweroff
```
Loading