Skip to content

Commit

Permalink
Merge branch 'develop' into or/remove-pgmq-and-partman
Browse files Browse the repository at this point in the history
  • Loading branch information
olirice committed Oct 29, 2024
2 parents be4e27a + 004595d commit a870a9d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 18 deletions.
22 changes: 14 additions & 8 deletions Dockerfile-15
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,26 @@ ARG wal_g_release=2.0.1

FROM ubuntu:focal as base

RUN apt update -y && apt install -y \

ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
TZ=Etc/UTC

# Pre-configure tzdata before any installations
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apt-get update && \
apt-get install -y --no-install-recommends tzdata && \
apt-get install -y \
curl \
gnupg \
lsb-release \
software-properties-common \
wget \
sudo \
&& apt clean
git \
&& apt clean && \
rm -rf /var/lib/apt/lists/*


RUN adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres
Expand Down Expand Up @@ -102,12 +114,6 @@ RUN chown -R postgres:postgres /usr/lib/postgresql
RUN ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets


RUN apt-get update && \
apt-get install -y --no-install-recommends tzdata

RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata

RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
Expand Down
23 changes: 14 additions & 9 deletions Dockerfile-16
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,25 @@ ARG wal_g_release=2.0.1

FROM ubuntu:focal as base

RUN apt update -y && apt install -y \
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
TZ=Etc/UTC

# Pre-configure tzdata before any installations
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apt-get update && \
apt-get install -y --no-install-recommends tzdata && \
apt-get install -y \
curl \
gnupg \
lsb-release \
software-properties-common \
wget \
sudo \
&& apt clean
git \
&& apt clean && \
rm -rf /var/lib/apt/lists/*


RUN adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres
Expand Down Expand Up @@ -101,13 +112,7 @@ RUN chown -R postgres:postgres /usr/lib/postgresql

RUN ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets


RUN apt-get update && \
apt-get install -y --no-install-recommends tzdata

RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata


RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
Expand Down
18 changes: 18 additions & 0 deletions ansible/tasks/stage2-setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
# shell: |
# sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install nixpkgs#openjdk11"
# It was decided to leave pljava disabled at https://github.com/supabase/postgres/pull/690 therefore removing this task

- name: Install Git for Nix package management
become: yes
apt:
name: git
state: present
update_cache: yes
when: stage2_nix

- name: Install Postgres from nix binary cache
become: yes
shell: |
Expand Down Expand Up @@ -34,6 +43,15 @@
sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{postgresql_version}}_src"
when: stage2_nix

- name: Remove Git after Nix package installations
become: yes
apt:
name: git
state: absent
autoremove: yes
purge: yes
when: stage2_nix

- name: Set ownership and permissions for /etc/ssl/private
become: yes
file:
Expand Down
3 changes: 2 additions & 1 deletion nix/ext/wrappers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
, darwin
, jq
, rust-bin
, git
}:
let
rustVersion = "1.80.0";
Expand All @@ -29,7 +30,7 @@ buildPgrxExtension_0_12_6 rec {
};

nativeBuildInputs = [ pkg-config cargo ];
buildInputs = [ openssl postgresql ] ++ lib.optionals (stdenv.isDarwin) [
buildInputs = [ openssl postgresql git ] ++ lib.optionals (stdenv.isDarwin) [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
Expand Down

0 comments on commit a870a9d

Please sign in to comment.