chore(database): add aiven_extrs extension to postgres docker (#2263)

* chore(database): add aiven_extrs extension to postgres docker

* chore(database): fix pkg versions and remove cache in dockerfile

* chore(database): use quotes in dockerfile and fix to minor version of pkgs

* chore(database): fix dockerfile lint

* chore(database): checkout to specific commit

* chore(database): remove aiven_extras migration
This commit is contained in:
Alessandro Magionami
2024-05-24 14:50:34 +02:00
committed by GitHub
parent c6506641a9
commit 42df6db7ea
2 changed files with 28 additions and 1 deletions
+3 -1
View File
@@ -3,7 +3,9 @@ services:
# Actual Speckle Server dependencies
postgres:
image: 'postgres:14.5-alpine'
build:
context: .
dockerfile: docker/postgres/Dockerfile
restart: always
environment:
POSTGRES_DB: speckle
+25
View File
@@ -0,0 +1,25 @@
FROM postgres:14.5-alpine as builder
RUN apk add --no-cache 'git=~2.36' \
'build-base=~0.5' \
'clang=~13.0' \
'llvm13=~13.0'
WORKDIR /
RUN git clone --branch 1.1.9 https://github.com/aiven/aiven-extras.git aiven-extras
WORKDIR /aiven-extras
RUN git checkout 36598ab \
&& git clean -df \
&& make \
&& make install
FROM postgres:14.5-alpine
COPY --from=builder /aiven-extras/aiven_extras.control /usr/local/share/postgresql/extension/aiven_extras.control
COPY --from=builder /aiven-extras/sql/aiven_extras.sql /usr/local/share/postgresql/extension/aiven_extras--1.1.9.sql
COPY --from=builder /aiven-extras/aiven_extras.so /usr/local/lib/postgresql/aiven_extras.so
EXPOSE 5432
CMD ["postgres"]