Skip to content

Commit

Permalink
Optimized for midcore (#48)
Browse files Browse the repository at this point in the history
* Optimized for midcore

* Optimized for midcore part 2

* Optimized for midcore part 3

* Optimized for midcore part 4
  • Loading branch information
pirog authored Dec 7, 2024
1 parent 0e09465 commit 0ea2f42
Show file tree
Hide file tree
Showing 30 changed files with 94 additions and 132 deletions.
19 changes: 16 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
{
"env": {
"node": true,
"mocha": true
"mocha": true,
"es2021": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8,
"requireConfigFile": false
},
"extends": "google",
"extends": [
"eslint:recommended",
"google"
],
"rules": {
"arrow-parens": ["error",
"as-needed"
],
"max-len": ["error", {
"code": 120,
"code": 140,
"ignoreComments": true
}],
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}],

"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-postgres-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
fail-fast: false
matrix:
lando-version:
- 3-edge-slim
- 3-edge
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
leia-test:
- examples/9.6
- examples/10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- ubuntu-24.04
- macos-14
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.github
.nyc_output
coverage
docs
examples
guides
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Optimized for `midcore`

## v1.4.3 - [December 6, 2024](https://github.com/lando/postgres/releases/tag/v1.4.3)

* Updated the version index.md to get Docuverse page to build correctly.
Expand Down
2 changes: 1 addition & 1 deletion builders/postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ module.exports = {

// Send it downstream
super(id, options, {services: _.set({}, options.name, postgres)});
};
}
},
};
6 changes: 3 additions & 3 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const {name, version} = require('../../package.json');
const landoPlugin = name.replace('@lando/', '');

export default defineConfig({
title: 'Lando Postgres Plugin',
description: 'The offical Lando plugin for Postgres.',
title: 'Lando PostgreSQL Plugin',
description: 'The offical Lando plugin for PostgreSQL.',
landoDocs: 3,
landoPlugin,
version,
Expand All @@ -20,7 +20,7 @@ export default defineConfig({
],
themeConfig: {
multiVersionBuild: {
satisfies: '>=1.0.0',
satisfies: '>=1.4.0',
},
sidebar: sidebar(),
},
Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: Learn how to configure the Lando Postgres service.

# Configuration

Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/core/v3/services/lando.html) to get a good handle on how the magicks work.
Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/services/lando-3.html) to get a good handle on how the magicks work.

Also note that the below options are in addition to the [build steps](https://docs.lando.dev/core/v3/services/lando.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/services/lando.html#overrides) that are available to every service.
Also note that the below options are in addition to the [build steps](https://docs.lando.dev/services/lando-3.html#build-steps) and [overrides](https://docs.lando.dev/services/lando-3.html#overrides) that are available to every service.

::: warning Be careful when switching database type, version or credentials!
You should be careful switching database `type`, `version` or `creds`.
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Development
description: Learn how to develop and contribute to the Lando Postgres service
description: Learn how to develop and contribute to the Lando PostgreSQL service
---

# Development
Expand Down
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Postgres Lando Plugin
title: PostgreSQL Lando Plugin
description: Add a highly configurable Postgres service to Lando for local development with all the power of Docker and Docker Compose.
next: ./config.html
---

# Postgres
# PostgreSQL

[PostgreSQL](https://www.postgresql.org/) is an advanced open source database server.

You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3).
You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/services/lando-3.html) top-level config in your [Landofile](https://docs.lando.dev/landofile/).

```yaml
services:
Expand All @@ -28,7 +28,7 @@ services:
* **[10](https://hub.docker.com/r/bitnami/postgresql)** **(default)**
* [10.6.0](https://hub.docker.com/r/bitnami/postgresql)
* [9.6](https://hub.docker.com/r/bitnami/postgresql)
* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides)
* [custom](https://docs.lando.dev/services/lando-3.html#overrides)
## Patch versions
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Installation
description: How to install the Lando Postgres Plugin.
description: How to install the Lando PostgreSQL Plugin.
---

# Installation
Expand Down
4 changes: 2 additions & 2 deletions docs/support.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Contact Us
description: Get help and support for the Lando Postgres Plugin
description: Get help and support for the Lando PostgreSQL Plugin
---

# Contact Us
Expand All @@ -21,4 +21,4 @@ If you need priority and dedicated support, expediated bug fixes or more feature
<p>
<button type="submit">Submit</button>
</p>
</form>
</form>
6 changes: 3 additions & 3 deletions docs/team.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Learn about the team that made the Postgres plugin.
description: Learn about the team that made the PostgreSQL plugin.
layout: page
title: Team
---
Expand All @@ -10,7 +10,7 @@ title: Team
Team
</template>
<template #lead>
We are the people who brought Postgres to Lando.
We are the people who brought PostgreSQL to Lando.
</template>
</VPLTeamPageTitle>
<VPLTeamMembers :members="members" size="small"/>
Expand All @@ -22,4 +22,4 @@ import {useTeam} from '@lando/vitepress-theme-default-plus';

const members = useTeam();

</script>
</script>
14 changes: 5 additions & 9 deletions examples/10/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Postgres Example
================
# PostgreSQL 10 Example

This example exists primarily to test the following documentation:

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

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

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

Expand All @@ -16,14 +14,13 @@ lando poweroff
lando start
```

Verification commands
---------------------
## Verification commands

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

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

# Should see the default database on healthcheck
lando healthcheckdefaults | grep 'database'
Expand All @@ -35,8 +32,7 @@ lando verifydefaultsdatabase | grep 'pg_database'
lando crossconnect | grep 'pg_database'
```

Destroy tests
-------------
## Destroy tests

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

Expand Down
14 changes: 5 additions & 9 deletions examples/11/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Postgres Example
================
# PostgreSQL 11 Example

This example exists primarily to test the following documentation:

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

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

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

Expand All @@ -16,14 +14,13 @@ lando poweroff
lando start
```

Verification commands
---------------------
## Verification commands

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

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

# Should see the default database on healthcheck
lando healthcheckdefaults | grep 'database'
Expand All @@ -35,8 +32,7 @@ lando verifydefaultsdatabase | grep 'pg_database'
lando crossconnect | grep 'pg_database'
```

Destroy tests
-------------
## Destroy tests

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

Expand Down
14 changes: 5 additions & 9 deletions examples/12/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Postgres Example
================
# PostgreSQL 12 Example

This example exists primarily to test the following documentation:

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

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

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

Expand All @@ -16,14 +14,13 @@ lando poweroff
lando start
```

Verification commands
---------------------
## Verification commands

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

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

# Should see the default database on healthcheck
lando healthcheckdefaults | grep 'database'
Expand All @@ -35,8 +32,7 @@ lando verifydefaultsdatabase | grep 'pg_database'
lando crossconnect | grep 'pg_database'
```

Destroy tests
-------------
## Destroy tests

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

Expand Down
14 changes: 5 additions & 9 deletions examples/13/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Postgres Example
================
# PostgreSQL 13 Example

This example exists primarily to test the following documentation:

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

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

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

Expand All @@ -16,14 +14,13 @@ lando poweroff
lando start
```

Verification commands
---------------------
## Verification commands

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

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

# Should see the default database on healthcheck
lando healthcheckdefaults | grep 'database'
Expand All @@ -35,8 +32,7 @@ lando verifydefaultsdatabase | grep 'pg_database'
lando crossconnect | grep 'pg_database'
```

Destroy tests
-------------
## Destroy tests

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

Expand Down
Loading

0 comments on commit 0ea2f42

Please sign in to comment.