generate TYPESENSE_API_KEY
This commit is contained in:
@@ -76,4 +76,4 @@ VITE_APP_NAME="${APP_NAME}"
|
||||
SANCTUM_STATEFUL_DOMAINS=localhost,127.0.0.1,localhost:8000,localhost:5173
|
||||
|
||||
TYPESENSE_CONNECTION=typesense
|
||||
TYPESENSE_API_KEY=xyz
|
||||
TYPESENSE_API_KEY=
|
||||
|
||||
@@ -20,11 +20,13 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY scripts/init-dev.sh /usr/local/bin/init-dev.sh
|
||||
COPY scripts/init-prod.sh /usr/local/bin/init-prod.sh
|
||||
COPY scripts/wait-mariadb.sh /usr/local/bin/wait-mariadb.sh
|
||||
COPY scripts/wait-typesense.sh /usr/local/bin/wait-typesense.sh
|
||||
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh \
|
||||
/usr/local/bin/init-dev.sh \
|
||||
/usr/local/bin/init-prod.sh \
|
||||
/usr/local/bin/wait-mariadb.sh
|
||||
/usr/local/bin/wait-mariadb.sh \
|
||||
/usr/local/bin/wait-typesense.sh
|
||||
|
||||
WORKDIR /var/www/app
|
||||
|
||||
|
||||
@@ -48,6 +48,13 @@ if [ -f composer.json ]; then
|
||||
fi
|
||||
|
||||
cp /tmp/app.env .env
|
||||
|
||||
/usr/local/bin/wait-typesense.sh
|
||||
|
||||
TYPESENSE_API_KEY=$(cat /typesense-data/api-key)
|
||||
sed -i "s/^TYPESENSE_API_KEY=.*/TYPESENSE_API_KEY=$TYPESENSE_API_KEY/" .env
|
||||
|
||||
|
||||
chown www-data:www-data .env
|
||||
chmod 664 .env
|
||||
|
||||
|
||||
@@ -44,6 +44,12 @@ if [ -f composer.json ]; then
|
||||
composer install --no-interaction --prefer-dist
|
||||
|
||||
cp /tmp/app.env .env
|
||||
|
||||
/usr/local/bin/wait-typesense.sh
|
||||
|
||||
TYPESENSE_API_KEY=$(cat /typesense-data/api-key)
|
||||
sed -i "s/^TYPESENSE_API_KEY=.*/TYPESENSE_API_KEY=$TYPESENSE_API_KEY/" .env
|
||||
|
||||
chown www-data:www-data .env
|
||||
chmod 640 .env
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
while [ ! -f /typesense-data/api-key ]; do
|
||||
sleep 1
|
||||
done
|
||||
Reference in New Issue
Block a user