Browse Source

deploy: 772f7bf8be

live_develop
GilbN 3 years ago
parent
commit
5cca0b5623
  1. 8
      docker/root/defaults/default
  2. 8
      docker/root/etc/cont-init.d/50-config
  3. 4
      docker/root/etc/services.d/themepark/run
  4. 2
      themes.py

8
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;
}

8
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

4
docker/root/etc/services.d/themepark/run

@ -1,4 +0,0 @@
#!/usr/bin/with-contenv bash
exec \
python3 /config/www/themes.py

2
themes.py

@ -139,7 +139,7 @@ if __name__ == "__main__":
themes = [name for name in listdir('./css/theme-options') if isfile(join('./css/theme-options', name))]
community_themes = [name for name in listdir('./css/community-theme-options') if isfile(join('./css/community-theme-options', name))]
develop = True if isdir(".git") and subprocess.check_output(["git", "symbolic-ref", "--short", "HEAD"]).decode('ascii').strip() == "develop" else False
if env_domain:
if env_domain and env_domain != '$http_host':
DOMAIN = env_domain
else:
with open("CNAME", "rt", closefd=True) as cname:

Loading…
Cancel
Save