aboutsummaryrefslogtreecommitdiff
path: root/build/scripts
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2024-08-02 08:35:38 +0200
committerGitHub <noreply@github.com>2024-08-02 08:35:38 +0200
commita37d3179581297248a768b57c59e3c36b2834549 (patch)
tree298718f86fd0ab0277180b582d11870d2ec605ca /build/scripts
parent989795973103c463a33f053663c6a8616177186c (diff)
Bump go to 1.21 (#3360)
Diffstat (limited to 'build/scripts')
-rw-r--r--build/scripts/Complement.Dockerfile2
-rw-r--r--build/scripts/ComplementLocal.Dockerfile2
-rw-r--r--build/scripts/ComplementPostgres.Dockerfile12
3 files changed, 8 insertions, 8 deletions
diff --git a/build/scripts/Complement.Dockerfile b/build/scripts/Complement.Dockerfile
index 453d8976..660b84a4 100644
--- a/build/scripts/Complement.Dockerfile
+++ b/build/scripts/Complement.Dockerfile
@@ -1,6 +1,6 @@
#syntax=docker/dockerfile:1.2
-FROM golang:1.20-bullseye as build
+FROM golang:1.22-bookworm as build
RUN apt-get update && apt-get install -y sqlite3
WORKDIR /build
diff --git a/build/scripts/ComplementLocal.Dockerfile b/build/scripts/ComplementLocal.Dockerfile
index 0b80cfc4..8fc84765 100644
--- a/build/scripts/ComplementLocal.Dockerfile
+++ b/build/scripts/ComplementLocal.Dockerfile
@@ -8,7 +8,7 @@
#
# Use these mounts to make use of this dockerfile:
# COMPLEMENT_HOST_MOUNTS='/your/local/dendrite:/dendrite:ro;/your/go/path:/go:ro'
-FROM golang:1.18-stretch
+FROM golang:1.22-bookworm
RUN apt-get update && apt-get install -y sqlite3
ENV SERVER_NAME=localhost
diff --git a/build/scripts/ComplementPostgres.Dockerfile b/build/scripts/ComplementPostgres.Dockerfile
index 77071b45..0026842d 100644
--- a/build/scripts/ComplementPostgres.Dockerfile
+++ b/build/scripts/ComplementPostgres.Dockerfile
@@ -1,19 +1,19 @@
#syntax=docker/dockerfile:1.2
-FROM golang:1.20-bullseye as build
+FROM golang:1.22-bookworm as build
RUN apt-get update && apt-get install -y postgresql
WORKDIR /build
-# No password when connecting over localhost
-RUN sed -i "s%127.0.0.1/32 md5%127.0.0.1/32 trust%g" /etc/postgresql/13/main/pg_hba.conf && \
+# No password when connecting to Postgres
+RUN sed -i "s%peer%trust%g" /etc/postgresql/15/main/pg_hba.conf && \
# Bump up max conns for moar concurrency
- sed -i 's/max_connections = 100/max_connections = 2000/g' /etc/postgresql/13/main/postgresql.conf
+ sed -i 's/max_connections = 100/max_connections = 2000/g' /etc/postgresql/15/main/postgresql.conf
# This entry script starts postgres, waits for it to be up then starts dendrite
RUN echo '\
#!/bin/bash -eu \n\
pg_lsclusters \n\
- pg_ctlcluster 13 main start \n\
+ pg_ctlcluster 15 main start \n\
\n\
until pg_isready \n\
do \n\
@@ -50,7 +50,7 @@ EXPOSE 8008 8448
# At runtime, generate TLS cert based on the CA now mounted at /ca
# At runtime, replace the SERVER_NAME with what we are told
CMD /build/run_postgres.sh && ./generate-keys --keysize 1024 --server $SERVER_NAME --tls-cert server.crt --tls-key server.key --tls-authority-cert /complement/ca/ca.crt --tls-authority-key /complement/ca/ca.key && \
- ./generate-config -server $SERVER_NAME --ci --db postgresql://postgres@localhost/postgres?sslmode=disable > dendrite.yaml && \
+ ./generate-config -server $SERVER_NAME --ci --db "user=postgres database=postgres host=/var/run/postgresql/" > dendrite.yaml && \
# Bump max_open_conns up here in the global database config
sed -i 's/max_open_conns:.*$/max_open_conns: 1990/g' dendrite.yaml && \
cp /complement/ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates && \