~dricottone/huttese

2d2a6f66c88338f618bb6b6e5ceb6c26aec64b89 — Dominic Ricottone 1 year, 7 months ago 89e1c63
Major updates

The sourcehut and redis images have been updated to the most recent
versions, each running on an Alpine 3.17 base image.

The postgresql image is being held back on a version 14 image for now.
M Makefile.docker => Makefile.docker +3 -3
@@ 8,12 8,12 @@ HUTTESE_REDIS=huttredis
HUTTESE_POSTGRES=huttpg

# configure redis
REDIS_TARGET=redis:alpine3.15
REDIS_TARGET=redis:alpine3.17
REDIS_LOCALNAME=my-redis
REDIS_DATADIR=/var/deploy/data/redis

# configure postgres
POSTGRES_TARGET=postgres:alpine3.15
POSTGRES_TARGET=postgres:alpine3.17
POSTGRES_LOCALNAME=my-postgres
POSTGRES_DATADIR=/var/deploy/data/postgres
POSTGRES_CONF=/var/deploy/conf/postgres/postgresql.conf


@@ 23,7 23,7 @@ GIT_DATADIR=/var/deploy/data/git

# set image tag data
SRHT_LOCALNAME=srht
SRHT_LOCALVERSION=2
SRHT_LOCALVERSION=3

CERTDIR=/var/deploy/certs


M Makefile.podman => Makefile.podman +7 -7
@@ 8,12 8,12 @@ HUTTESE_REDIS=huttredis
HUTTESE_POSTGRES=huttpg

# configure redis
REDIS_TARGET=docker.io/library/redis:alpine3.15
REDIS_TARGET=docker.io/library/redis:alpine3.17
REDIS_LOCALNAME=my-redis
REDIS_DATADIR=/var/deploy/data/redis

# configure postgres
POSTGRES_TARGET=docker.io/library/postgres:alpine3.15
POSTGRES_TARGET=docker.io/library/postgres:14-alpine
POSTGRES_LOCALNAME=my-postgres
POSTGRES_DATADIR=/var/deploy/data/postgres
POSTGRES_CONF=/var/deploy/conf/postgres/postgresql.conf


@@ 23,7 23,7 @@ GIT_DATADIR=/var/deploy/data/git

# set image tag data
SRHT_LOCALNAME=srht
SRHT_LOCALVERSION=2
SRHT_LOCALVERSION=3

CERTDIR=/var/deploy/certs



@@ 166,25 166,25 @@ backups/db-postgres-backup.sql:
	mkdir -p backups
	$(CONMAN) exec -it $(HUTTESE_POSTGRES) bash -c 'pg_dump --clean --dbname=postgres --username=postgres > /db-postgres-backup.sql'
	$(CONMAN) cp $(HUTTESE_POSTGRES):/db-postgres-backup.sql backups/db-postgres-backup.sql
	#try: $(CONMAN) cp backups/db-postgres-backup.sql cp $(HUTTESE_POSTGRES):/db-postgres-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=postgres --username=postgres /db-postgres-backup.sql
	#try: $(CONMAN) cp backups/db-postgres-backup.sql $(HUTTESE_POSTGRES):/db-postgres-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=postgres --username=postgres /db-postgres-backup.sql

backups/db-meta.sr.ht-backup.sql:
	mkdir -p backups
	$(CONMAN) exec -it $(HUTTESE_POSTGRES) bash -c 'pg_dump --clean --dbname=meta.sr.ht --username=postgres > /db-meta.sr.ht-backup.sql'
	$(CONMAN) cp $(HUTTESE_POSTGRES):/db-meta.sr.ht-backup.sql backups/db-meta.sr.ht-backup.sql
	#try: $(CONMAN) cp backups/db-meta.sr.ht-backup.sql cp $(HUTTESE_POSTGRES):/db-meta.sr.ht-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=meta.sr.ht --username=postgres /db-meta.sr.ht-backup.sql
	#try: $(CONMAN) cp backups/db-meta.sr.ht-backup.sql $(HUTTESE_POSTGRES):/db-meta.sr.ht-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=meta.sr.ht --username=postgres /db-meta.sr.ht-backup.sql

backups/db-git.sr.ht-backup.sql:
	mkdir -p backups
	$(CONMAN) exec -it $(HUTTESE_POSTGRES) bash -c 'pg_dump --clean --dbname=git.sr.ht --username=postgres > /db-git.sr.ht-backup.sql'
	$(CONMAN) cp $(HUTTESE_POSTGRES):/db-git.sr.ht-backup.sql backups/db-git.sr.ht-backup.sql
	#try: $(CONMAN) cp backups/db-git.sr.ht-backup.sql cp $(HUTTESE_POSTGRES):/db-git.sr.ht-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=git.sr.ht --username=postgres /db-git.sr.ht-backup.sql
	#try: $(CONMAN) cp backups/db-git.sr.ht-backup.sql $(HUTTESE_POSTGRES):/db-git.sr.ht-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=git.sr.ht --username=postgres /db-git.sr.ht-backup.sql

backups/db-todo.sr.ht-backup.sql:
	mkdir -p backups
	$(CONMAN) exec -it $(HUTTESE_POSTGRES) bash -c 'pg_dump --clean --dbname=todo.sr.ht --username=postgres > /db-todo.sr.ht-backup.sql'
	$(CONMAN) cp $(HUTTESE_POSTGRES):/db-todo.sr.ht-backup.sql backups/db-todo.sr.ht-backup.sql
	#try: $(CONMAN) cp backups/db-todo.sr.ht-backup.sql cp $(HUTTESE_POSTGRES):/db-todo.sr.ht-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=todo.sr.ht --username=postgres /db-todo.sr.ht-backup.sql
	#try: $(CONMAN) cp backups/db-todo.sr.ht-backup.sql $(HUTTESE_POSTGRES):/db-todo.sr.ht-backup.sql && $(CONMAN) exec -it $(HUTTESE_POSTGRES) pg_restore --clean --dbname=todo.sr.ht --username=postgres /db-todo.sr.ht-backup.sql

backups/git-backup.tar.gz:
	mkdir -p backups

M sr/Dockerfile.aarch64 => sr/Dockerfile.aarch64 +2 -2
@@ 1,10 1,10 @@
FROM alpine:3.15
FROM alpine:3.17

# apk
COPY pkg /var/huttese-apk
COPY etc/apk/repositories.aarch64 /etc/apk/repositories
COPY etc/apk/keys/*.rsa.pub /etc/apk/keys/
RUN apk add --no-cache postfix meta.sr.ht git.sr.ht todo.sr.ht supervisor nginx fcgiwrap spawn-fcgi git-daemon py3-gunicorn openssh
RUN apk add --no-cache py3-srht postfix meta.sr.ht git.sr.ht todo.sr.ht supervisor nginx fcgiwrap spawn-fcgi git-daemon py3-gunicorn openssh

# supervisor
RUN mkdir /var/log/supervisord

M sr/Dockerfile.x86 => sr/Dockerfile.x86 +1 -1
@@ 1,4 1,4 @@
FROM alpine:3.15
FROM alpine:3.17

# apk
COPY etc/apk/repositories.x86 /etc/apk/repositories

M sr/etc/apk/repositories.aarch64 => sr/etc/apk/repositories.aarch64 +2 -2
@@ 1,3 1,3 @@
/var/huttese-apk
https://dl-cdn.alpinelinux.org/alpine/v3.15/main
https://dl-cdn.alpinelinux.org/alpine/v3.15/community
https://dl-cdn.alpinelinux.org/alpine/v3.17/main
https://dl-cdn.alpinelinux.org/alpine/v3.17/community

M sr/etc/apk/repositories.x86 => sr/etc/apk/repositories.x86 +3 -3
@@ 1,3 1,3 @@
https://mirror.sr.ht/alpine/v3.15/sr.ht
https://dl-cdn.alpinelinux.org/alpine/v3.15/main
https://dl-cdn.alpinelinux.org/alpine/v3.15/community
https://mirror.sr.ht/alpine/v3.17/sr.ht
https://dl-cdn.alpinelinux.org/alpine/v3.17/main
https://dl-cdn.alpinelinux.org/alpine/v3.17/community

M sr/etc/nginx/http.d/git.conf => sr/etc/nginx/http.d/git.conf +1 -1
@@ 46,7 46,7 @@ server {
	}

	location /static {
		root /usr/lib/python3.9/site-packages/gitsrht;
		root /usr/lib/python3.10/site-packages/gitsrht;
		expires 30d;
	}


M sr/etc/nginx/http.d/meta.conf => sr/etc/nginx/http.d/meta.conf +5 -1
@@ 43,6 43,10 @@ server {
		add_header Content-Security-Policy "default-src 'none'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src 'self' 'unsafe-inline' *.stripe.com *.stripe.network; frame-src *.stripe.com *.stripe.network" always;
	}

	location /.well-known/oauth-authorization-server {
		proxy_pass http://127.0.0.1:5000;
	}

	location /query {
		proxy_read_timeout 300s;
		proxy_connect_timeout 75s;


@@ 51,7 55,7 @@ server {
	}

	location /static {
		root /usr/lib/python3.9/site-packages/metasrht;
		root /usr/lib/python3.10/site-packages/metasrht;
		expires 30d;
	}


M sr/etc/nginx/http.d/todo.conf => sr/etc/nginx/http.d/todo.conf +1 -1
@@ 46,7 46,7 @@ server {
	}

	location /static {
		root /usr/lib/python3.9/site-packages/todosrht;
		root /usr/lib/python3.10/site-packages/todosrht;
		expires 30d;
	}