Skip to content

Commit f70632b

Browse files
cstocktonChris Stockton
andauthored
feat: add /etc/supabase-release with ami version file (#2103)
Currently we write the AMI version to /root/supabase-release which requires root access to read. Here we add /root/supabase-release so local unprivileged services can determine the configuration of the system they are running on. Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
1 parent edee072 commit f70632b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ebssurrogate/scripts/surrogate-bootstrap-nix.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ function setup_chroot_environment {
275275
rm -f /mnt/tmp/chroot-bootstrap-nix.sh
276276
echo "${POSTGRES_SUPABASE_VERSION}" > /mnt/root/supabase-release
277277

278+
# Copy the AMI version into the /etc/supabase-release file
279+
echo "${POSTGRES_SUPABASE_VERSION}" > /mnt/etc/supabase-release
280+
chmod 644 /mnt/etc/supabase-release
281+
278282
# Copy the nvme identification script into /sbin inside the chroot
279283
mkdir -p /mnt/sbin
280284
cp /tmp/ebsnvme-id /mnt/sbin/ebsnvme-id

0 commit comments

Comments
 (0)