Skip to content

Commit 78fd845

Browse files
committed
Merge branch 'develop'
2 parents 046754d + 377291a commit 78fd845

File tree

106 files changed

+24485
-1880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+24485
-1880
lines changed

.github/workflows/ami-release-nix-single.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
4747
extra_nix_config: |
4848
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
49-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
49+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
5050
5151
- name: Set PostgreSQL version environment variable
5252
run: |

.github/workflows/ami-release-nix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
3131
extra_nix_config: |
3232
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
33-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
33+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
3434
3535
- name: Set PostgreSQL versions
3636
id: set-versions
@@ -65,7 +65,7 @@ jobs:
6565
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
6666
extra_nix_config: |
6767
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
68-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
68+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
6969
7070
- name: Run checks if triggered manually
7171
if: ${{ github.event_name == 'workflow_dispatch' }}

.github/workflows/nix-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
7474
extra_nix_config: |
7575
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
76-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
76+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
7777
post-build-hook = /etc/nix/upload-to-cache.sh
7878
- name: Install nix
7979
uses: cachix/install-nix-action@v27
@@ -82,7 +82,7 @@ jobs:
8282
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
8383
extra_nix_config: |
8484
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
85-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
85+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
8686
- name: Aggressive disk cleanup for DuckDB build
8787
if: matrix.runner == 'macos-latest-xlarge'
8888
run: |

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
extra-conf: |
2121
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
22-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
22+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
2323
- name: Set PostgreSQL versions
2424
id: set-versions
2525
run: |
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
extra-conf: |
4949
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
50-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
50+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
5151
- name: Set PostgreSQL version environment variable
5252
run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV
5353
- name: Strip quotes from pg major and set env var

.github/workflows/testinfra-ami-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
2828
extra_nix_config: |
2929
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
30-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
30+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
3131
3232
- name: Set PostgreSQL versions
3333
id: set-versions
@@ -77,7 +77,7 @@ jobs:
7777
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
7878
extra_nix_config: |
7979
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
80-
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
80+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
8181
8282
8383
- id: args

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ common-nix.vars.pkr.hcl
3030

3131
# pre-commit config is managed in nix
3232
.pre-commit-config.yaml
33-
nixos.qcow2
33+
nixos.qcow2

Dockerfile-15

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/
5656
--init none \
5757
--no-confirm \
5858
--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \
59-
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
59+
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
6060

6161
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"
6262

@@ -90,10 +90,6 @@ RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/lib/postgresql/s
9090
RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/share/postgresql/
9191
RUN chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/
9292
RUN chown -R postgres:postgres /usr/share/postgresql/
93-
# Create symbolic links for contrib directory
94-
RUN mkdir -p /usr/lib/postgresql/share/postgresql/contrib \
95-
&& find /nix/var/nix/profiles/default/share/postgresql/contrib/ -mindepth 1 -type d -exec sh -c 'for dir do ln -s "$dir" "/usr/lib/postgresql/share/postgresql/contrib/$(basename "$dir")"; done' sh {} + \
96-
&& chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/contrib/
9793

9894
RUN chown -R postgres:postgres /usr/lib/postgresql
9995

@@ -126,6 +122,20 @@ RUN nix profile install .#wal-g-3 && \
126122

127123
RUN nix store gc
128124

125+
WORKDIR /
126+
####################
127+
# setup-groonga
128+
####################
129+
FROM base as groonga
130+
131+
WORKDIR /nixpg
132+
133+
RUN nix profile install .#supabase-groonga && \
134+
mkdir -p /tmp/groonga-plugins && \
135+
cp -r /nix/var/nix/profiles/default/lib/groonga/plugins /tmp/groonga-plugins/
136+
137+
RUN nix store gc
138+
129139
WORKDIR /
130140
# ####################
131141
# # Download gosu for easy step-down from root
@@ -157,6 +167,7 @@ FROM gosu as production
157167
RUN id postgres || (echo "postgres user does not exist" && exit 1)
158168
# # Setup extensions
159169
COPY --from=walg /tmp/wal-g /usr/local/bin/
170+
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
160171

161172
# # Initialise configs
162173
COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf
@@ -220,4 +231,7 @@ ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive
220231
RUN mkdir -p /usr/share/postgresql/extension/ && \
221232
ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \
222233
chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh
234+
235+
ENV GRN_PLUGINS_DIR=/usr/lib/groonga/plugins
236+
223237
CMD ["postgres", "-D", "/etc/postgresql"]

Dockerfile-17

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/
5858
--init none \
5959
--no-confirm \
6060
--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \
61-
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
61+
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
6262

6363
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"
6464

@@ -91,7 +91,7 @@ RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/lib/postgresql/s
9191
RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/share/postgresql/
9292
RUN chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/
9393
RUN chown -R postgres:postgres /usr/share/postgresql/
94-
# Create symbolic links for contrib directory
94+
9595
RUN tree /nix > /tmp/tree.txt && cat /tmp/tree.txt && cat /tmp/tree.txt >&2
9696

9797
RUN chown -R postgres:postgres /usr/lib/postgresql
@@ -126,6 +126,20 @@ RUN nix profile install .#wal-g-3 && \
126126

127127
RUN nix store gc
128128

129+
WORKDIR /
130+
####################
131+
# setup-groonga
132+
####################
133+
FROM base as groonga
134+
135+
WORKDIR /nixpg
136+
137+
RUN nix profile install .#supabase-groonga && \
138+
mkdir -p /tmp/groonga-plugins && \
139+
cp -r /nix/var/nix/profiles/default/lib/groonga/plugins /tmp/groonga-plugins/
140+
141+
RUN nix store gc
142+
129143
WORKDIR /
130144
# ####################
131145
# # Download gosu for easy step-down from root
@@ -157,6 +171,7 @@ FROM gosu as production
157171
RUN id postgres || (echo "postgres user does not exist" && exit 1)
158172
# # Setup extensions
159173
COPY --from=walg /tmp/wal-g /usr/local/bin/
174+
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
160175

161176
# # Initialise configs
162177
COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf
@@ -229,4 +244,7 @@ ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive
229244
RUN mkdir -p /usr/share/postgresql/extension/ && \
230245
ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \
231246
chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh
247+
248+
ENV GRN_PLUGINS_DIR=/usr/lib/groonga/plugins
249+
232250
CMD ["postgres", "-D", "/etc/postgresql"]

Dockerfile-orioledb-17

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/
5858
--init none \
5959
--no-confirm \
6060
--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \
61-
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
61+
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
6262

6363
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"
6464

@@ -91,7 +91,7 @@ RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/lib/postgresql/s
9191
RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/share/postgresql/
9292
RUN chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/
9393
RUN chown -R postgres:postgres /usr/share/postgresql/
94-
# Create symbolic links for contrib directory
94+
9595
RUN tree /nix > /tmp/tree.txt && cat /tmp/tree.txt && cat /tmp/tree.txt >&2
9696

9797
RUN chown -R postgres:postgres /usr/lib/postgresql
@@ -126,6 +126,20 @@ RUN nix profile install .#wal-g-3 && \
126126

127127
RUN nix store gc
128128

129+
WORKDIR /
130+
####################
131+
# setup-groonga
132+
####################
133+
FROM base as groonga
134+
135+
WORKDIR /nixpg
136+
137+
RUN nix profile install .#supabase-groonga && \
138+
mkdir -p /tmp/groonga-plugins && \
139+
cp -r /nix/var/nix/profiles/default/lib/groonga/plugins /tmp/groonga-plugins/
140+
141+
RUN nix store gc
142+
129143
WORKDIR /
130144
# ####################
131145
# # Download gosu for easy step-down from root
@@ -157,6 +171,7 @@ FROM gosu as production
157171
RUN id postgres || (echo "postgres user does not exist" && exit 1)
158172
# # Setup extensions
159173
COPY --from=walg /tmp/wal-g /usr/local/bin/
174+
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
160175

161176
# # Initialise configs
162177
COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf
@@ -235,4 +250,6 @@ RUN mkdir -p /usr/share/postgresql/extension/ && \
235250
ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \
236251
chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh
237252

253+
ENV GRN_PLUGINS_DIR=/usr/lib/groonga/plugins
254+
238255
CMD ["postgres", "-D", "/etc/postgresql"]

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ function initiate_upgrade {
286286
chmod +x "$NIX_INSTALLER_PATH"
287287
"$NIX_INSTALLER_PATH" install --no-confirm \
288288
--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \
289-
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
289+
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
290290
else
291291
echo "1.1.1. Installing Nix using the official installer"
292292

293293
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm \
294294
--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \
295-
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
295+
--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
296296
fi
297297
else
298298
echo "1.1. Nix is installed; moving on."

0 commit comments

Comments
 (0)