diff --git a/compose/frontend/StaticBuild b/compose/frontend/StaticBuild index 46647dbe..4802d5ff 100644 --- a/compose/frontend/StaticBuild +++ b/compose/frontend/StaticBuild @@ -52,13 +52,6 @@ COPY ./compose/frontend/default.conf /etc/nginx/conf.d COPY --from=buildnode /app/build /usr/share/nginx/html RUN chmod -R 777 /run /var/log/nginx /var/cache/nginx /usr/share/nginx/html/static/js -#FOUR LINES BELOW ARE TEMPORARY FOR THE PRIVATE BETA -RUN mkdir -p /etc/apache2 -RUN touch /etc/apache2/.htpasswd -RUN chmod -R 777 /etc/apache2/.htpasswd -RUN chmod -R 777 /etc/nginx/conf.d - - ARG DEBUG_BUILD=false # Add debugging tools into builds if enabled diff --git a/compose/frontend/default.conf b/compose/frontend/default.conf index e7612414..fafe1b3c 100644 --- a/compose/frontend/default.conf +++ b/compose/frontend/default.conf @@ -14,8 +14,6 @@ server { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; - auth_basic "Beta Site"; - auth_basic_user_file /etc/apache2/.htpasswd; } proxy_cache cache; diff --git a/compose/frontend/entrypoint b/compose/frontend/entrypoint index 3e778fa0..3ec76401 100644 --- a/compose/frontend/entrypoint +++ b/compose/frontend/entrypoint @@ -11,14 +11,4 @@ echo -e "window.ROUTE_PLANNER_KEY='${REACT_APP_ROUTE_PLANNER_KEY}';" >> $MAIN echo -e "window.REPLAY_THE_DAY='${REACT_APP_REPLAY_THE_DAY}';" >> $MAIN # Set the environment to be used for caching django content -sed -i "s~{ENVIRONMENT}~$ENVIRONMENT~g" /etc/nginx/conf.d/default.conf - -#FOLLOWING SECTION IS TEMPORARY FOR THE PRIVATE BETA -# Check if $ENVIRONMENT is not set to "prod". If it is prod we want to keep these lines -if [ "$ENVIRONMENT" != "prod" ]; then - # Remove the specified lines from default.conf - sed -i '/auth_basic "Beta Site";/d' /etc/nginx/conf.d/default.conf - sed -i '/auth_basic_user_file \/etc\/apache2\/.htpasswd;/d' /etc/nginx/conf.d/default.conf -fi -#Copy the content of the secret into the .htpasswd file. -echo "$TEMP_AUTH_SECRET" >> /etc/apache2/.htpasswd \ No newline at end of file +sed -i "s~{ENVIRONMENT}~$ENVIRONMENT~g" /etc/nginx/conf.d/default.conf \ No newline at end of file