Skip to content

Commit

Permalink
Update 40-create-ghcred.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hizclick authored Apr 30, 2024
1 parent 46bdb26 commit b0ace21
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions 40-create-ghcred.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
#/bin/sh
# create nginx config from evironment
#!/bin/sh

# Set default value for VUE_APP_PUBLIC_PATH if not provided
# Get VUE_APP_PUBLIC_PATH from Docker endpoint
#VUE_APP_PUBLIC_PATH=$(cat /proc/1/environ | grep VUE_APP_PUBLIC_PATH | cut -d '=' -f2)

# Copy files with the specified public path
#cp -r /usr/app/dist /usr/share/nginx/html/$VUE_APP_PUBLIC_PATH
echo $VUE_APP_PUBLIC_PATH
ln -s /usr/share/nginx/html /usr/share/nginx/html$VUE_APP_PUBLIC_PATH
#sed -e "//js/++mylocation/js"
sed -i "s+/myAppPlaceholder+$VUE_APP_PUBLIC_PATH+g" /usr/share/nginx/html/index.html
sed -i "s+/myAppPlaceholder+$VUE_APP_PUBLIC_PATH+g" /usr/share/nginx/html/js/app.*.js

# Create nginx config from environment variables
# *prevent envsubst from killing nginx vars with 'tr' and '@'*
cat <<EOT | envsubst | tr '@' '$' >/GH_OAUTH_CLIENT.conf
set @CLIENT_ID $CLIENT_ID;
set @CLIENT_SECRET $CLIENT_SECRET;
set @CALL_BACK $CALL_BACK
EOT
set @CALL_BACK $CALL_BACK;
EOT

0 comments on commit b0ace21

Please sign in to comment.