diff --git a/docker/root/defaults/default b/docker/root/defaults/default index ce6b866c..5e698386 100644 --- a/docker/root/defaults/default +++ b/docker/root/defaults/default @@ -14,10 +14,10 @@ server { location / { sub_filter_types *; - sub_filter 'https://theme-park.dev' https://TP_DOMAIN; - sub_filter 'http://theme-park.dev' http://TP_DOMAIN; - sub_filter 'https://develop.theme-park.dev' https://TP_DOMAIN; - sub_filter 'http://develop.theme-park.dev' http://TP_DOMAIN; + sub_filter 'https://theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'http://theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'https://develop.theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'http://develop.theme-park.dev' $scheme://TP_DOMAIN; sub_filter_once off; try_files $uri $uri/ /index.html; } diff --git a/docker/root/etc/cont-init.d/50-config b/docker/root/etc/cont-init.d/50-config index b4664bfc..e4c17df2 100644 --- a/docker/root/etc/cont-init.d/50-config +++ b/docker/root/etc/cont-init.d/50-config @@ -23,10 +23,7 @@ if [[ -z ${TP_SCHEME} ]]; then fi DEFAULT='/defaults/default' -sed -i "s/sub_filter 'https:\/\/theme-park.dev' https:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' ${TP_SCHEME}:\/\/${TP_DOMAIN}; /g" ${DEFAULT} -sed -i "s/sub_filter 'http:\/\/theme-park.dev' http:\/\/TP_DOMAIN;/sub_filter 'http:\/\/theme-park.dev' ${TP_SCHEME}:\/\/${TP_DOMAIN}; /g" ${DEFAULT} -sed -i "s/sub_filter 'https:\/\/develop.theme-park.dev' https:\/\/TP_DOMAIN;/sub_filter 'https:\/\/develop.theme-park.dev' ${TP_SCHEME}:\/\/${TP_DOMAIN}; /g" ${DEFAULT} -sed -i "s/sub_filter 'http:\/\/develop.theme-park.dev' http:\/\/TP_DOMAIN;/sub_filter 'http:\/\/develop.theme-park.dev' ${TP_SCHEME}:\/\/${TP_DOMAIN}; /g" ${DEFAULT} +sed -i "s/TP_DOMAIN/${TP_DOMAIN} /g" ${DEFAULT} cp /defaults/default /config/nginx/site-confs # make our folders and links @@ -40,6 +37,9 @@ cp /app/themepark/index.html /config/www cp /app/themepark/themes.py /config/www cp /app/themepark/CNAME /config/www +echo 'Creating CSS files' +python3 /config/www/themes.py + # permissions chown -R abc:abc \ /config \ No newline at end of file