File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,20 @@ RUN nix profile install .#wal-g-3 && \
122122
123123RUN nix store gc
124124
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+
125139WORKDIR /
126140# ####################
127141# # Download gosu for easy step-down from root
@@ -153,6 +167,7 @@ FROM gosu as production
153167RUN id postgres || (echo "postgres user does not exist" && exit 1)
154168# # Setup extensions
155169COPY --from=walg /tmp/wal-g /usr/local/bin/
170+ COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
156171
157172# # Initialise configs
158173COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf
@@ -216,4 +231,7 @@ ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive
216231RUN mkdir -p /usr/share/postgresql/extension/ && \
217232 ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \
218233 chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh
234+
235+ ENV GRN_PLUGINS_DIR=/usr/lib/groonga/plugins
236+
219237CMD ["postgres", "-D", "/etc/postgresql"]
Original file line number Diff line number Diff line change @@ -126,6 +126,20 @@ RUN nix profile install .#wal-g-3 && \
126126
127127RUN 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+
129143WORKDIR /
130144# ####################
131145# # Download gosu for easy step-down from root
@@ -157,6 +171,7 @@ FROM gosu as production
157171RUN id postgres || (echo "postgres user does not exist" && exit 1)
158172# # Setup extensions
159173COPY --from=walg /tmp/wal-g /usr/local/bin/
174+ COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
160175
161176# # Initialise configs
162177COPY --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
229244RUN 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+
232250CMD ["postgres", "-D", "/etc/postgresql"]
Original file line number Diff line number Diff line change @@ -126,6 +126,20 @@ RUN nix profile install .#wal-g-3 && \
126126
127127RUN 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+
129143WORKDIR /
130144# ####################
131145# # Download gosu for easy step-down from root
@@ -157,6 +171,7 @@ FROM gosu as production
157171RUN id postgres || (echo "postgres user does not exist" && exit 1)
158172# # Setup extensions
159173COPY --from=walg /tmp/wal-g /usr/local/bin/
174+ COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
160175
161176# # Initialise configs
162177COPY --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+
238255CMD ["postgres", "-D", "/etc/postgresql"]
You can’t perform that action at this time.
0 commit comments