8000 chore: fix AIO image gotrue config file persistence (#680) · supabase/postgres@80c4bd0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 80c4bd0

Browse files
authored
chore: fix AIO image gotrue config file persistence (#680)
* chore: fix gotrue config file persistence
1 parent 62a8a8d commit 80c4bd0

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

docker/all-in-one/init/configure-gotrue.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ sed -i "s|gotrue_api_host|${GOTRUE_API_HOST:-0.0.0.0}|g" /etc/gotrue.env
77
sed -i "s|gotrue_site_url|$GOTRUE_SITE_URL|g" /etc/gotrue.env
88
sed -i "s|gotrue_jwt_secret|$JWT_SECRET|g" /etc/gotrue.env
99

10-
GOTRUE_CUSTOM_DIR="${DATA_VOLUME_MOUNTPOINT}/etc/gotrue"
11-
mkdir -p "${GOTRUE_CUSTOM_DIR}"
10+
GOTRUE_CUSTOM_CONFIG_FILE_PATH="${DATA_VOLUME_MOUNTPOINT}/etc/gotrue.env"
1211
if [ ! -f "${CONFIGURED_FLAG_PATH}" ]; then
13-
echo "Copying existing custom GoTrue config from /etc/gotrue to ${GOTRUE_CUSTOM_DIR}"
14-
cp -R "/etc/gotrue/." "${GOTRUE_CUSTOM_DIR}/"
12+
echo "Copying existing GoTrue config from /etc/gotrue.env to ${GOTRUE_CUSTOM_CONFIG_FILE_PATH}"
13+
cp "/etc/gotrue.env" "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}"
1514
fi
1615

17-
rm -rf "/etc/gotrue"
18-
ln -s "${GOTRUE_CUSTOM_DIR}" "/etc/gotrue"
19-
chown -R adminapi:adminapi "/etc/gotrue"
20-
chown -R adminapi:adminapi "${GOTRUE_CUSTOM_DIR}"
21-
chmod g+rx "${GOTRUE_CUSTOM_DIR}"
16+
rm "/etc/gotrue.env"
17+
ln -s "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}" "/etc/gotrue.env"
18+
chown -R adminapi:adminapi "/etc/gotrue.env"
19+
chown -R adminapi:adminapi "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}"
20+
chmod g+rx "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}"
2221

2322
if [ -f "${INIT_PAYLOAD_PATH:-}" ]; then
2423
echo "init gotrue payload"

0 commit comments

Comments
 (0)
0