-
Notifications
You must be signed in to change notification settings - Fork 0
ci(release)!: v2 #11
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
Merged
Merged
ci(release)!: v2 #11
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
892c80b
feat(postgraphile)!: upgrade to v5
dargmuesli 8efa844
Merge pull request #10 from maevsi/feat/postgraphile/v5
dargmuesli 34c87df
chore(release): 2.0.0-beta.1 [skip ci]
semantic-release-bot 600aa4c
chore(deps): add maevsi/sqitch v11.0.0-beta.1
dargmuesli f3f7d82
fix(postgres): readd connection string
dargmuesli 9270ba5
chore(release): 2.0.0-beta.2 [skip ci]
semantic-release-bot 59bf0c5
fix(postgis): update plugin with geojson/srid fix
dargmuesli 6ed597b
chore(release): 2.0.0-beta.3 [skip ci]
semantic-release-bot 369cfe9
fix(grafast): correct context claim value encoding
dargmuesli dc70e2b
chore(release): 2.0.0-beta.4 [skip ci]
semantic-release-bot b84ee8c
fix(deps): update postgraphile
dargmuesli 65b70d1
feat(jwt)!: use ecdsa key
dargmuesli 5f3b3be
chore(release): 2.0.0-beta.5 [skip ci]
semantic-release-bot 28afe83
Merge pull request #13 from maevsi/feat/jwt/ecdsa
dargmuesli 05e1b09
chore(release): 2.0.0-beta.6 [skip ci]
semantic-release-bot d8af90f
chore(deps): upgrade
dargmuesli 0a25782
Merge pull request #14 from maevsi/chore/deps/upgrade
dargmuesli 1db6171
Merge branch 'main' into beta
dargmuesli aa21ea7
chore(release): 2.0.0-beta.7 [skip ci]
semantic-release-bot 2cee61d
fix(ci): update package version
dargmuesli 652fd00
fix(docker): streamline entrypoint
dargmuesli 8e7f3b4
chore(release): 2.0.0-beta.8 [skip ci]
semantic-release-bot 90ef06f
chore(docker): streamline entrypoint
dargmuesli 8ca4eae
feat(package): update description
dargmuesli 9b730f9
chore(agents): add instructions
dargmuesli 5ee2488
Merge pull request #15 from maevsi/feat/package/description
dargmuesli e2da9a9
chore(release): 2.0.0-beta.9 [skip ci]
semantic-release-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 @@ | ||
| node_modules | ||
| .eslintcache |
This file contains hidden or 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,2 @@ | ||
| node_modules | ||
| .eslintcache |
This file contains hidden or 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,4 @@ | ||
| { | ||
| "semi": false, | ||
| "singleQuote": true | ||
| } |
This file contains hidden or 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 hidden or 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,5 +1,4 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "extends": ["github>dargmuesli/renovate-config"], | ||
| "semanticCommitType": "fix" | ||
| "extends": ["github>dargmuesli/renovate-config"] | ||
| } |
This file contains hidden or 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,3 +1,8 @@ | ||
| { | ||
| "recommendations": ["editorconfig.editorconfig"] | ||
| "recommendations": [ | ||
| "dbaeumer.vscode-eslint", | ||
| "editorconfig.editorconfig", | ||
| "esbenp.prettier-vscode", | ||
| "timonwong.shellcheck" | ||
| ] | ||
| } |
This file contains hidden or 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,8 +1,4 @@ | ||
| { | ||
| "[json]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| }, | ||
| "[jsonc]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| } | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "shellcheck.customArgs": ["-x"] | ||
| } |
This file contains hidden or 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,24 @@ | ||
| --- | ||
| applyTo: '**' | ||
| --- | ||
| # Project Instructions | ||
| This project is a PostGraphile v5 server that converts PostgreSQL schemas into a GraphQL API. It defines one of many services of `vibetype`, an event community platform. The PostgreSQL schemas used by this service are applied as SQL migrations by the `sqitch` service. | ||
|
|
||
| ## Files | ||
| - `src/graphile.config.ts` contains the main PostGraphile configuration. | ||
| - `src/graphile.ts` contains scripted logic. | ||
| - `src/environment.ts` contains type-safe environment variable utilities. | ||
|
|
||
| ## JWT | ||
| - Algorithm: ES256 | ||
| - Audience, issuer: postgraphile | ||
| - PostgreSQL composite type: `vibetype.jwt` | ||
|
|
||
| ## Workflow | ||
| - Lint with `pnpm run lint`. | ||
|
|
||
| ## General | ||
| - Code style | ||
| - Sort any elements (imports, object properties, functions, ...), e.g. alphabetically, except when it doesn't make sense. | ||
| - Agents | ||
| - After making changes to the codebase, ensure AGENTS.md is in sync with your knowledge of the project. |
This file contains hidden or 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 hidden or 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,3 +1,98 @@ | ||
| FROM graphile/postgraphile:4.14.1 AS development | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| RUN yarn add @graphile/postgis | ||
| # <DEPENDENCIES> | ||
| FROM ghcr.io/maevsi/sqitch:11.0.0-beta.1 | ||
| # </DEPENDENCIES> | ||
|
|
||
| ######################## | ||
| # Create base. | ||
|
|
||
| FROM node:24.13.1-alpine AS base | ||
|
|
||
| # The `CI` environment variable must be set for pnpm to run in headless mode | ||
| ENV CI=true | ||
|
|
||
| WORKDIR /srv/app/ | ||
|
|
||
| RUN corepack enable | ||
|
|
||
|
|
||
| ######################## | ||
| # Serve development. | ||
|
|
||
| FROM base AS development | ||
|
|
||
| ENV GRAPHILE_ENV=development | ||
|
|
||
| RUN mkdir \ | ||
| /srv/.pnpm-store \ | ||
| /srv/app/node_modules \ | ||
| && chown node:node \ | ||
| /srv/.pnpm-store \ | ||
| /srv/app/node_modules | ||
| VOLUME /srv/.pnpm-store | ||
| VOLUME /srv/app | ||
| VOLUME /srv/app/node_modules | ||
|
|
||
| USER node | ||
| ENTRYPOINT ["/srv/app/docker-entrypoint.sh"] | ||
dargmuesli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| CMD ["pnpm", "exec", "postgraphile", "--config", "./src/graphile.config.ts", "-n", "0.0.0.0"] | ||
dargmuesli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| EXPOSE 5678 | ||
| HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD wget -q --spider http://127.0.0.1:5678/ || exit 1 | ||
|
|
||
|
|
||
| ######################## | ||
| # Prepare environment. | ||
|
|
||
| FROM base AS prepare | ||
|
|
||
| COPY ./pnpm-lock.yaml ./package.json ./graphile-postgis-v0.2.0.tgz ./ | ||
|
|
||
| RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \ | ||
| pnpm fetch | ||
|
|
||
| COPY ./ ./ | ||
|
|
||
| RUN pnpm install --offline | ||
|
|
||
|
|
||
| ######################## | ||
| # Lint code. | ||
|
|
||
| FROM prepare AS lint | ||
|
|
||
| RUN pnpm run lint | ||
|
|
||
|
|
||
| ######################## | ||
| # Build for production. | ||
|
|
||
| FROM prepare AS build | ||
|
|
||
| RUN pnpm install --offline --prod | ||
|
|
||
|
|
||
| ######################## | ||
| # Collect results. | ||
|
|
||
| FROM base AS collect | ||
|
|
||
| COPY --from=prepare /srv/app/src ./src | ||
| COPY --from=prepare /srv/app/docker-entrypoint.sh /srv/app/package.json ./ | ||
| COPY --from=build /srv/app/node_modules ./node_modules | ||
| COPY --from=lint /srv/app/package.json /dev/null | ||
|
|
||
|
|
||
| ######################## | ||
| # Serve production. | ||
|
|
||
| FROM collect AS production | ||
|
|
||
| ENV NODE_ENV=production | ||
|
|
||
| USER node | ||
| ENTRYPOINT ["/srv/app/docker-entrypoint.sh"] | ||
| CMD ["pnpm", "exec", "postgraphile", "--config", "./src/graphile.config.ts", "-n", "0.0.0.0"] | ||
| EXPOSE 5678 | ||
| HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD wget -q --spider http://127.0.0.1:5678/ || exit 1 | ||
| LABEL org.opencontainers.image.description="PostGraphile GraphQL API for the Vibetype platform; includes @graphile/postgis, Amber preset, Grafast optimizations, and JWT authentication." | ||
This file contains hidden or 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,3 +1,3 @@ | ||
| # postgraphile | ||
|
|
||
| Vibetype's postgraphile container image amends the default by the `@graphile/postgis` plugin. | ||
| PostGraphile GraphQL API for the Vibetype platform; includes @graphile/postgis, Amber preset, Grafast optimizations, and JWT authentication. |
This file contains hidden or 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,38 @@ | ||
| #!/bin/sh | ||
| set -eu | ||
|
|
||
| ENVIRONMENT_VARIABLES_PATH="/run/environment-variables" | ||
|
|
||
| is_valid_var_name() { | ||
| case "$1" in | ||
| ''|[!a-zA-Z_]*|*[!a-zA-Z0-9_]*) return 1 ;; | ||
| *) return 0 ;; | ||
| esac | ||
| } | ||
|
|
||
| load_env_file() { | ||
| file="$1" | ||
| name=$(basename "$file") | ||
| is_valid_var_name "$name" || return 0 | ||
| value="$(printf '%s' "$(cat "$file")")" | ||
| export "$name=$value" | ||
| } | ||
|
|
||
| load_environment_variables() { | ||
| [ -d "$ENVIRONMENT_VARIABLES_PATH" ] || return 0 | ||
| set -- "$ENVIRONMENT_VARIABLES_PATH"/* | ||
| [ -e "$1" ] || return 0 | ||
|
|
||
| for file in "$ENVIRONMENT_VARIABLES_PATH"/*; do | ||
| [ -f "$file" ] && load_env_file "$file" | ||
| done | ||
| } | ||
|
|
||
| load_environment_variables | ||
|
|
||
| if [ "$NODE_ENV" != "production" ]; then | ||
| pnpm config set store-dir "/srv/.pnpm-store" | ||
| pnpm install | ||
| fi | ||
|
|
||
| exec "$@" |
This file contains hidden or 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,21 @@ | ||
| import js from '@eslint/js' | ||
| import json from '@eslint/json' | ||
| import { defineConfig } from 'eslint/config' | ||
| import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' | ||
| import tseslint from 'typescript-eslint' | ||
|
|
||
| export default defineConfig([ | ||
| { | ||
| files: ['**/*.{js,mjs,cjs,ts,mts,cts}'], | ||
| plugins: { js }, | ||
| extends: ['js/recommended'], | ||
| }, | ||
| tseslint.configs.recommended, | ||
dargmuesli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| files: ['**/*.json'], | ||
| plugins: { json }, | ||
| language: 'json/json', | ||
| extends: ['json/recommended'], | ||
| }, | ||
| eslintPluginPrettierRecommended, | ||
| ]) | ||
Binary file not shown.
This file contains hidden or 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,42 @@ | ||
| { | ||
| "author": "Jonas Thelemann <e-mail+maevsi_postgraphile@jonas-thelemann.de>", | ||
| "bugs": { | ||
| "url": "https://github.com/maevsi/postgraphile/issues" | ||
| }, | ||
| "dependencies": { | ||
| "@graphile/postgis": "file:graphile-postgis-v0.2.0.tgz", | ||
| "jose": "6.2.2", | ||
| "postgraphile": "5.0.0" | ||
| }, | ||
| "description": "PostGraphile GraphQL API for the Vibetype platform; includes @graphile/postgis, Amber preset, Grafast optimizations, and JWT authentication.", | ||
| "devDependencies": { | ||
| "@eslint/js": "10.0.1", | ||
| "@eslint/json": "1.2.0", | ||
| "eslint": "10.1.0", | ||
| "eslint-config-prettier": "10.1.8", | ||
| "eslint-plugin-prettier": "5.5.5", | ||
| "grafserv": "1.0.0", | ||
| "graphile": "5.0.0", | ||
| "jiti": "2.6.1", | ||
| "prettier": "3.8.1", | ||
| "typescript": "6.0.2", | ||
| "typescript-eslint": "8.58.0" | ||
| }, | ||
| "homepage": "https://github.com/maevsi/postgraphile#readme", | ||
| "license": "MIT", | ||
| "name": "@maevsi/postgraphile", | ||
| "packageManager": "pnpm@10.29.3", | ||
| "private": true, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/maevsi/postgraphile.git" | ||
| }, | ||
| "scripts": { | ||
| "lint": "pnpm run lint:es && pnpm run lint:ts", | ||
| "lint:es": "eslint --cache", | ||
| "lint:fix": "pnpm run lint:es --fix", | ||
| "lint:ts": "tsc --noEmit" | ||
| }, | ||
| "type": "module", | ||
| "version": "2.0.0-beta.9" | ||
| } | ||
dargmuesli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.