Compare commits

..

69 commits

Author SHA1 Message Date
f
aa87543511
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
2024-10-29 11:52:17 -03:00
f
0e8b6ac71a
fix: move docker password to plugin config
https://github.com/woodpecker-ci/woodpecker/issues/4140#issuecomment-2369019247
2024-10-23 10:35:32 -03:00
f
fc1a12e592
fix: upgrade alpines 2024-09-14 17:25:35 -03:00
f
000ac53f39
feat: upgrades
https://alpinelinux.org/posts/Alpine-3.17.9-3.18.8-3.19.3-released.html

https://alpinelinux.org/posts/Alpine-3.20.2-released.html
2024-07-23 10:18:44 -03:00
f
53c901224d
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
2024-06-21 13:09:16 -03:00
f
41354bbc95
fix: deprecate MAINTAINER 2024-06-21 12:21:51 -03:00
f
c0e6b8150b
refactor: use matrix so it's easier to merge downstream containers 2024-06-19 10:15:44 -03:00
f
f7da597784
feat: upgrade 2024-06-19 10:14:59 -03:00
f
cf4da1b233
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
2024-05-23 15:52:01 -03:00
f
b99a8111d8
feat: 3.20 released 2024-05-22 10:20:38 -03:00
f
aa086a76af
BREAKING CHANGE: deprecate 3.16 2024-05-22 10:20:27 -03:00
f
2a72840be0
fix: 3.15 eol 2024-02-13 13:22:59 -03:00
f
397dff920a
fix: upgrade alpine 2024-02-13 13:22:45 -03:00
f
91fb3a3c8b
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
Some checks failed
ci/woodpecker/push/woodpecker/4 Pipeline failed
ci/woodpecker/push/woodpecker/2 Pipeline failed
ci/woodpecker/push/woodpecker/6 Pipeline failed
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/5 Pipeline failed
ci/woodpecker/push/woodpecker/7 Pipeline failed
ci/woodpecker/push/woodpecker/1 Pipeline was successful
2023-12-12 15:23:23 -03:00
f
e66b364db7
ci: pipeline is deprecated 2023-12-12 13:36:48 -03:00
f
b921379aa0
feat: alpine 3.19 2023-12-07 10:22:26 -03:00
f
8dd7d4605a
fix: bad commit 2023-12-04 11:06:47 -03:00
f
d11e588f03
feat: alpine upgrades 2023-12-04 11:03:14 -03:00
f
768bd2acd4
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2023-10-02 15:04:56 -03:00
f
5085c7e8df
feat: alpine 3.18.4 2023-09-28 12:24:44 -03:00
f
1233c89aff fix: use proper namespaces 2023-08-24 11:50:53 -03:00
f
b05361ae18 fix: set the env var
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-08-16 13:04:14 -03:00
f
2e1d831b82 fix: don't produce login errors
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-08-16 12:54:44 -03:00
f
e79a054aa4 feat: install specific versions
so we can apply security upgrades
2023-08-16 12:54:24 -03:00
f
d8924318e4 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-08-10 11:45:54 -03:00
f
3dde92d4de BREAKING CHANGE: deprecate alpine 3.14 2023-08-08 11:18:21 -03:00
f
3e098e8c24 fix: upgrade alpines 2023-08-08 11:18:00 -03:00
f
582b83d3fa fix: 3.18.2 2023-06-15 12:37:11 -03:00
f
5d35cad642 feat: upgrade alpine
https://alpinelinux.org/posts/Alpine-3.15.9-3.16.6-3.17.4-3.18.2-released.html
2023-06-14 13:10:38 -03:00
f
05838f7c90 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-10 13:14:11 -03:00
f
fedf64f2b9 feat: alpine 3.18 2023-05-10 12:41:25 -03:00
f
aebf2bcae3 feat: enable logical replication ability
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-04-05 14:35:47 -03:00
f
95ecdbd47f Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-04-04 18:24:19 -03:00
f
24c31e7eb8 fix: base registry 2023-04-04 18:03:51 -03:00
f
da19bd76f8 BREAKING CHANGE: use public gitea registry 2023-04-04 17:22:42 -03:00
f
1ad3693d73 BREAKING CHANGE: deprecate alpines older than 3.17
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-03-29 20:28:39 -03:00
f
82e28910a9 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2023-03-29 20:28:17 -03:00
f
1068b67884 feat: alpine upgrades 2023-03-29 16:32:41 -03:00
f
434501ef54 feat: alpine upgrade 2023-02-11 12:39:02 -03:00
f
9ee7d3659b fix: let postgresql handle its pidfile
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-02-04 19:37:00 -03:00
f
d72d52401e feat: upgrade to 3.17.1
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-02-04 19:01:38 -03:00
f
886b03bfc6 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2023-02-04 19:01:08 -03:00
f
dcf07f90e7 refactor: use strings 2023-01-14 16:09:32 -03:00
f
4aa380ee62 feat: alpine 3.17.1 2023-01-14 16:08:15 -03:00
f
9591fdd419 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-23 12:38:26 -03:00
f
c4d0c8ac35 feat: 3.17 upgrade 2022-11-23 10:58:48 -03:00
f
b0dadddbb0 fix: 3.16.3 bug release 2022-11-23 10:58:28 -03:00
f
c1e94bd27f fix: deprecate 3.13 2022-11-23 10:56:44 -03:00
f
4b19f48126 postgresql10
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-09-03 13:54:36 -03:00
f
2bc47841ff alpine 3.16.2 2022-09-03 13:54:20 -03:00
f
1c8763b81c Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2022-09-03 13:54:03 -03:00
f
0b354f4fea releases fixing zlib cve 2022-08-09 10:36:07 -03:00
f
9c4de359fb alpine upgrades 2022-07-19 18:48:03 -03:00
f
c90ba65374 alpine 3.16 2022-05-29 21:05:05 -03:00
f
4ac1583bcb CVE-2022-28391
https://security.alpinelinux.org/vuln/CVE-2022-28391
2022-04-04 16:08:10 -03:00
f
deaa49652f alpine releases
https://alpinelinux.org/posts/Alpine-3.12.11-3.13.9-3.14.5-3.15.3-released.html
2022-03-28 19:06:57 -03:00
f
e565c1380a woodpecker-cli lint 2022-03-19 14:48:54 -03:00
f
65304feb56 alpine upgrade 2022-03-19 14:46:16 -03:00
f
a299ab663f newer versions first 2022-03-08 09:43:09 -03:00
f
60df28bb2e user
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-03-07 15:35:23 -03:00
f
a08a7292fd full matrix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-07 15:32:09 -03:00
f
d81e3064d7 +x 2022-03-07 15:31:48 -03:00
f
79b2e15559 postgresql 12
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-07 15:24:24 -03:00
f
9a9ee411da alpine versions 2022-03-03 22:59:09 -03:00
f
2d01fb2d12 refactoring
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
* log more for auditing
* log to syslog
* support several versions
* extract configuration
* only init database; users, databases and privileges are set using
  deployment tools
2022-03-03 22:54:34 -03:00
f
95a7bb6915 ci
Some checks failed
continuous-integration/woodpecker the build failed
2021-10-09 13:26:56 -03:00
f
8c7863746f Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2021-10-09 13:25:59 -03:00
f
3dfc34388c ci 2021-10-03 20:19:00 -03:00
f
c06dc5a527
Enable CI 2020-04-10 19:55:35 -03:00
7 changed files with 101 additions and 55 deletions

11
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,11 @@
stages:
- build
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --destination $CI_REGISTRY_IMAGE:latest

38
.woodpecker.yml Normal file
View file

@ -0,0 +1,38 @@
steps:
publish:
image: "docker.io/woodpeckerci/plugin-docker-buildx"
settings:
registry: "https://gitea.nulo.in"
username: "sutty"
repo: "gitea.nulo.in/sutty/postgresql"
tags:
- "${ALPINE_VERSION}-${PG_VERSION}"
build_args:
- "ALPINE_VERSION=${ALPINE_VERSION}"
- "PG_VERSION=${PG_VERSION}"
- "PG_VERSION_APPENDED=${PG_VERSION_APPENDED}"
- "PG_VERSION_FULL=${PG_VERSION_FULL}"
- "BASE_IMAGE=gitea.nulo.in/sutty/monit"
password:
from_secret: "DOCKER_PASSWORD"
when:
branch: "antifascista"
event: "push"
matrix:
include:
- ALPINE_VERSION: "3.20.3"
PG_VERSION: "16"
PG_VERSION_APPENDED: "16"
PG_VERSION_FULL: "16.3"
- ALPINE_VERSION: "3.20.3"
PG_VERSION: "15"
PG_VERSION_APPENDED: "15"
PG_VERSION_FULL: "15.7"
- ALPINE_VERSION: "3.20.3"
PG_VERSION: "14"
PG_VERSION_APPENDED: "14"
PG_VERSION_FULL: "14.12"
- ALPINE_VERSION: "3.19.4"
PG_VERSION: "13"
PG_VERSION_APPENDED: "13"
PG_VERSION_FULL: "13.16"

View file

@ -1,21 +1,24 @@
FROM sutty/monit:latest
MAINTAINER "f <f@sutty.nl>"
ARG ALPINE_VERSION=3.18.3
ARG BASE_IMAGE=gitea.nulo.in/sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
LABEL org.opencontainers.image.authors="f@sutty.nl"
ARG PG_VERSION=13
ARG PG_VERSION_APPENDED
ARG PG_VERSION_FULL
ENV PGBASE /var/lib/postgresql
ENV PGDATA $PGBASE/13/data
ENV LANG en_US.utf8
ENV PGUSER sutty
ENV PGDB sutty
ENV PGVER 13
ENV PGCLIENT sutty
ENV PAGER "less -niSFX"
ENV PGVER=$PG_VERSION
ENV PGBASE=/var/lib/postgresql
ENV PGDATA=${PGBASE}/${PGVER}/data
ENV PAGER="less -niSFX"
RUN apk add --no-cache postgresql postgresql-contrib daemonize less
# Starting from Alpine 3.15 there are several PostgreSQL versions
# supported.
RUN apk add --no-cache postgresql${PG_VERSION_APPENDED}~${PG_VERSION_FULL} postgresql${PG_VERSION_APPENDED}-contrib daemonize less
RUN install -dm 750 -o postgres -g postgres /etc/postgres.d
COPY ./postgresql.sh /usr/local/bin/postgresql
COPY ./monit.conf /etc/monit.d/postgresql.conf
RUN chmod 750 /usr/local/bin/postgresql
COPY ./postgresqld.sh /usr/local/bin/postgresqld
COPY ./postgresql.conf /etc/postgres.d/postgresql.conf
EXPOSE 5432
VOLUME $PGBASE

View file

@ -1,4 +1,4 @@
check process postgresql with pidfile /tmp/postgresql.pid
start program = "/usr/local/bin/postgresql start"
stop program = "/usr/local/bin/postgresql stop"
if failed port 5432 protocol pgsql for 3 times within 5 cycles then restart
check process postgresql with pidfile /run/postgresql/pid
start program = "/usr/local/bin/postgresqld start"
stop program = "/usr/local/bin/postgresqld stop"
if failed port 5432 protocol pgsql username postgres for 3 times within 5 cycles then restart

8
postgresql.conf Normal file
View file

@ -0,0 +1,8 @@
listen_addresses = '*'
external_pid_file = '/run/postgresql/pid'
log_destination = 'syslog'
log_checkpoints = on
log_connections = on
log_disconnections = on
log_hostname = on
wal_level = logical

View file

@ -1,37 +0,0 @@
#!/bin/sh
set -e
case $1 in
stop)
/bin/su postgres -c "pg_ctl stop -D ${PGDATA}" ;;
reload)
/bin/su postgres -c "pg_ctl reload -D ${PGDATA}" ;;
*)
pid=/tmp/postgresql.pid
user=postgres
log=${PGDATA}/postgresql.log
install -dm 2750 -o postgres -g postgres /run/postgresql
chown -R postgres:postgres ${PGBASE}
if test ! -f ${PGDATA}/PG_VERSION ; then
su - postgres -c "/usr/bin/initdb --locale ${LANG} -E UTF8 -D ${PGDATA}"
su - postgres -c "/usr/bin/pg_ctl start --pgdata ${PGDATA}"
su - postgres -c "/usr/bin/createuser --login ${PGUSER}"
su - postgres -c "/usr/bin/createdb --owner ${PGUSER} ${PGDB}"
su - postgres -c "/usr/bin/pg_ctl stop --pgdata ${PGDATA}"
echo "host ${PGDB} ${PGUSER} ${PGCLIENT} trust" >> ${PGDATA}/pg_hba.conf
echo "host ${PGDB}_test ${PGUSER} ${PGCLIENT} trust" >> ${PGDATA}/pg_hba.conf
echo "listen_addresses = '*'" >> ${PGDATA}/postgresql.conf
echo "external_pid_file = '${pid}'" >> ${PGDATA}/postgresql.conf
fi
rm -f ${pid}
daemonize -u ${user} -c ${PGDATA} -o ${log} -a -e ${log} \
/usr/bin/postgres
su - postgres -c "echo 'create extension if not exists pgcrypto;' | psql -U postgres"
;;
esac

23
postgresqld.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/sh
set -e
user=postgres
case $1 in
stop)
su ${user} -c "pg_ctl stop -D ${PGDATA}" ;;
reload)
su ${user} -c "pg_ctl reload -D ${PGDATA}" ;;
*)
install -dm 2750 -o ${user} -g ${user} /run/postgresql
chown -R ${user}:${user} ${PGBASE}
if test ! -f ${PGDATA}/PG_VERSION ; then
su ${user} -c "/usr/bin/initdb -D ${PGDATA}"
echo "include_dir = '/etc/postgres.d'" >> ${PGDATA}/postgresql.conf
fi
daemonize -u ${user} -c ${PGDATA} /usr/bin/postgres
;;
esac