Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rnijveld committed Apr 12, 2024
0 parents commit 0681a3d
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
17 changes: 17 additions & 0 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build and push

permissions:
contents: read
packages: write

on:
push:
branches:
- main
schedule:
- cron: '30 2 * * SUN'

jobs:
build-and-push:
uses: ./.github/workflows/docker.yml
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Checks

permissions:
contents: read

on:
pull_request:

jobs:
build:
uses: ./.github/workflows/docker.yml
secrets: inherit
16 changes: 16 additions & 0 deletions .github/workflows/container-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Container Registry Cleanup

permissions:
contents: read
packages: write

on:
workflow_dispatch:
schedule:
- cron: '30 2 * * MON'

jobs:
untagged-cleanup:
uses: "tweedegolf/actions-container-helpers/.github/workflows/container-untagged-cleanup.yml@main"
with:
package: postgres
25 changes: 25 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Docker

on:
workflow_call:

jobs:
docker:
strategy:
matrix:
include:
- postgresql_version: 16
latest: true
- postgresql_version: 15
latest: false
- postgresql_version: 14
latest: false
uses: "tweedegolf/actions-container-helpers/.github/workflows/container-image.yml@main"
with:
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
build-args: |
PG_MAJOR=${{matrix.postgresql_version}}
tags: |
ghcr.io/tweedegolf/postgres:${{matrix.postgresql_version}}
${{ matrix.latest && 'ghcr.io/tweedegolf/postgres:latest' || '' }}
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG PG_MAJOR

FROM postgres:${PG_MAJOR}

ARG PG_MAJOR
ENV PG_MAJOR ${PG_MAJOR}

ENV POSTGIS_VERSION 3

RUN apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
postgis \
postgresql-${PG_MAJOR}-postgis-${POSTGIS_VERSION} \
postgresql-${PG_MAJOR}-postgis-${POSTGIS_VERSION}-scripts \
postgresql-${PG_MAJOR}-pgrouting \
postgresql-${PG_MAJOR}-pgrouting-scripts \
postgresql-${PG_MAJOR}-rational \
postgresql-${PG_MAJOR}-icu-ext \
postgresql-${PG_MAJOR}-toastinfo \
&& rm -rf /var/lib/apt/lists/*
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) 2024 Tweede Golf and Contributors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PostgresSQL with extensions docker image
This repository contains the source docker config for a postgresql image with
some often used additional extensions installed. It can be used for both
production and development purposes. Currently these versions are supported
with the tags listed:

* 16: `16`, `latest`
* 15: `15`
* 14: `14`

The following extensions are available within PostgreSQL:

* postgis - https://postgis.net/
* pgrouting - https://pgrouting.org/
* pg_rational - https://github.com/begriffs/pg_rational
* icu_ext - https://github.com/dverite/icu_ext
* toastinfo - https://github.com/credativ/toastinfo
* Supplied Modules - https://www.postgresql.org/docs/current/contrib.html

0 comments on commit 0681a3d

Please sign in to comment.