mirror of
https://github.com/gilbN/theme.park.git
synced 2024-11-19 17:42:32 +01:00
deploy: 5ed3cfbf5d
This commit is contained in:
parent
d8399a4d88
commit
8bc09e4b1a
66
.github/workflows/docker-build.yml
vendored
66
.github/workflows/docker-build.yml
vendored
@ -1,66 +0,0 @@
|
||||
name: docker build
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
branches:
|
||||
- live
|
||||
- live_develop
|
||||
jobs:
|
||||
push_to_ghcr_io:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
||||
- name: Set current date as env variable
|
||||
id: date_time
|
||||
run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S')
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_PAT }}
|
||||
- name: build&push live
|
||||
if: ${{ github.ref == 'refs/heads/live' }}
|
||||
run: |
|
||||
docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }}
|
||||
docker push ghcr.io/gilbn/theme.park
|
||||
- name: build&push dev
|
||||
if: ${{ github.ref == 'refs/heads/live_develop' }}
|
||||
run: |
|
||||
docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }}
|
||||
docker push --all-tags ghcr.io/gilbn/theme.park
|
||||
push_to_dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
||||
- name: Set current date as env variable
|
||||
id: date_time
|
||||
run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S')
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DH_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: build&push dh live
|
||||
if: ${{ github.ref == 'refs/heads/live' }}
|
||||
run: |
|
||||
docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }}
|
||||
docker push ghcr.io/gilbn/theme.park
|
||||
- name: build&push dh dev
|
||||
if: ${{ github.ref == 'refs/heads/live_develop' }}
|
||||
run: |
|
||||
docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }}
|
||||
docker push --all-tags gilbn/theme.park
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Calibre-Web"
|
||||
#copy local files.
|
||||
COPY root/ /
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Calibre-Web"
|
||||
#copy local files.
|
||||
COPY root/ /
|
||||
|
@ -1,45 +1,45 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo '--------------------------------'
|
||||
echo '| Calibre-web theme.park Mod |'
|
||||
echo '--------------------------------'
|
||||
|
||||
# Display variables for troubleshooting
|
||||
echo -e "Variables set:\\n\
|
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\
|
||||
'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\
|
||||
'TP_THEME'=${TP_THEME}\\n"
|
||||
|
||||
# Set default
|
||||
if [[ -z ${TP_DOMAIN} ]]; then
|
||||
echo 'No domain set, defaulting to theme-park.dev'
|
||||
TP_DOMAIN='theme-park.dev'
|
||||
fi
|
||||
|
||||
THEME_TYPE='theme-options'
|
||||
if [ "${TP_COMMUNITY_THEME}" = true ]; then
|
||||
THEME_TYPE='community-theme-options'
|
||||
fi
|
||||
|
||||
case ${TP_DOMAIN} in
|
||||
*"github.io"*)
|
||||
echo "Switching to github.io URL style"
|
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z ${TP_THEME} ]]; then
|
||||
echo 'No theme set, defaulting to organizr'
|
||||
TP_THEME='organizr'
|
||||
fi
|
||||
|
||||
# Adding stylesheets
|
||||
if ! grep -q "${TP_DOMAIN}/css/base" /app/calibre-web/cps/templates/layout.html; then
|
||||
echo '---------------------------'
|
||||
echo '| Adding the stylesheet |'
|
||||
echo '---------------------------'
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/calibreweb\/calibreweb-base.css'><\/head> /g" /app/calibre-web/cps/templates/layout.html
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" /app/calibre-web/cps/templates/layout.html
|
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}
|
||||
"
|
||||
fi
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo '--------------------------------'
|
||||
echo '| Calibre-web theme.park Mod |'
|
||||
echo '--------------------------------'
|
||||
|
||||
# Display variables for troubleshooting
|
||||
echo -e "Variables set:\\n\
|
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n\
|
||||
'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\
|
||||
'TP_THEME'=${TP_THEME}\\n"
|
||||
|
||||
# Set default
|
||||
if [[ -z ${TP_DOMAIN} ]]; then
|
||||
echo 'No domain set, defaulting to theme-park.dev'
|
||||
TP_DOMAIN='theme-park.dev'
|
||||
fi
|
||||
|
||||
THEME_TYPE='theme-options'
|
||||
if [ "${TP_COMMUNITY_THEME}" = true ]; then
|
||||
THEME_TYPE='community-theme-options'
|
||||
fi
|
||||
|
||||
case ${TP_DOMAIN} in
|
||||
*"github.io"*)
|
||||
echo "Switching to github.io URL style"
|
||||
TP_DOMAIN="${TP_DOMAIN}\/theme.park"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z ${TP_THEME} ]]; then
|
||||
echo 'No theme set, defaulting to organizr'
|
||||
TP_THEME='organizr'
|
||||
fi
|
||||
|
||||
# Adding stylesheets
|
||||
if ! grep -q "${TP_DOMAIN}/css/base" /app/calibre-web/cps/templates/layout.html; then
|
||||
echo '---------------------------'
|
||||
echo '| Adding the stylesheet |'
|
||||
echo '---------------------------'
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/calibreweb\/calibreweb-base.css'><\/head> /g" /app/calibre-web/cps/templates/layout.html
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" /app/calibre-web/cps/templates/layout.html
|
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}
|
||||
"
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo '---------------------------'
|
||||
echo '| Deluge theme.park Mod |'
|
||||
@ -34,12 +34,13 @@ if [[ -z ${TP_THEME} ]]; then
|
||||
fi
|
||||
|
||||
# Adding stylesheets
|
||||
if ! grep -q "${TP_DOMAIN}/css/base" /usr/lib/python3/dist-packages/deluge/ui/web/index.html; then
|
||||
DELUGE_INDEX_PATH=$(find -name index.html)
|
||||
if ! grep -q "${TP_DOMAIN}/css/base" ${DELUGE_INDEX_PATH}; then
|
||||
echo '---------------------------'
|
||||
echo '| Adding the stylesheet |'
|
||||
echo '---------------------------'
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/deluge\/deluge-base.css'><\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/deluge\/deluge-base.css'><\/head> /g" ${DELUGE_INDEX_PATH}
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" ${DELUGE_INDEX_PATH}
|
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}
|
||||
"
|
||||
fi
|
||||
fi
|
||||
|
@ -34,12 +34,5 @@ if [[ -z ${TP_THEME} ]]; then
|
||||
fi
|
||||
|
||||
# Adding stylesheets
|
||||
if ! grep -q "${TP_DOMAIN}/css/base" /app/emby/dashboard-ui/index.html; then
|
||||
echo '---------------------------'
|
||||
echo '| Adding the stylesheet |'
|
||||
echo '---------------------------'
|
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/emby\/emby-base.css'><\/body> /g" /app/emby/dashboard-ui/index.html
|
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/body> /g" /app/emby/dashboard-ui/index.html
|
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}
|
||||
"
|
||||
fi
|
||||
printf '%s\n' "@import url('https://${TP_DOMAIN}/css/${THEME_TYPE}/${TP_THEME}.css');" "@import url('https://${TP_DOMAIN}/css/base/emby/emby-base.css');" > /app/emby/dashboard-ui/modules/themes/light/theme.css
|
||||
printf 'Stylesheet set to %s\n' "${TP_THEME}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Jellyfin"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Jellyfin"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Lazylibrarian"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Lazylibrarian"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Librespeed"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Librespeed"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Lidarr"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Lidarr"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,7 +1,7 @@
|
||||
FROM scratch
|
||||
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Mylar3"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Mylar3"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="NZBGet"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="NZBGet"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Plex"
|
||||
#copy local files.
|
||||
COPY root/ /
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Plex"
|
||||
#copy local files.
|
||||
COPY root/ /
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Prowlarr"
|
||||
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Prowlarr"
|
||||
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,7 +1,7 @@
|
||||
FROM scratch
|
||||
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Qbittorrent"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Qbittorrent"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -27,8 +27,13 @@ if ! [[ -x "$(command -v svn)" ]]; then
|
||||
echo '--------------------------'
|
||||
echo '| Installing svn package |'
|
||||
echo '--------------------------'
|
||||
apt-get update && \
|
||||
apt-get install -y subversion
|
||||
if [ -x "$(command -v apk)" ]; then
|
||||
apk update && \
|
||||
apk add --no-cache subversion
|
||||
elif [ -x "$(command -v apt-get)" ]; then
|
||||
apt-get update && \
|
||||
apt-get install -y subversion
|
||||
fi
|
||||
fi
|
||||
|
||||
# Display variables for troubleshooting
|
||||
@ -80,8 +85,8 @@ if [[ ! -d /themepark ]]; then
|
||||
fi
|
||||
|
||||
sed_file(){
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/qbittorrent\/qbittorrent-base.css'><\/head> /g" $1
|
||||
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/head> /g" $1
|
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/base\/qbittorrent\/qbittorrent-base.css'><\/body> /g" $1
|
||||
sed -i "s/<\/body>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/body> /g" $1
|
||||
printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1"
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Radarr"
|
||||
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Radarr"
|
||||
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Readarr"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Readarr"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Rutorrent"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Rutorrent"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="SABnzbd"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="SABnzbd"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,7 +1,7 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Sonarr"
|
||||
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Sonarr"
|
||||
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Synclounge"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Synclounge"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Tautulli"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Tautulli"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="The Lounge"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="The Lounge"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,6 +1,6 @@
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Transmission"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="Transmission"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -1,7 +1,7 @@
|
||||
FROM scratch
|
||||
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="VueTorrent"
|
||||
#copy local files.
|
||||
FROM scratch
|
||||
|
||||
|
||||
LABEL maintainer="GilbN"
|
||||
LABEL app="VueTorrent"
|
||||
#copy local files.
|
||||
COPY root/ /
|
@ -58,8 +58,13 @@ install_deps() {
|
||||
echo '-------------------------'
|
||||
echo '| Installing jq package |'
|
||||
echo '-------------------------'
|
||||
apt-get update &&
|
||||
apt-get install -y jq
|
||||
if [ -x "$(command -v apk)" ]; then
|
||||
apk update && \
|
||||
apk add --no-cache jq
|
||||
elif [ -x "$(command -v apt-get)" ]; then
|
||||
apt-get update && \
|
||||
apt-get install -y jq
|
||||
fi
|
||||
fi
|
||||
}
|
||||
check_updates() {
|
||||
|
@ -1,18 +1,36 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.14
|
||||
|
||||
LABEL maintainer="Roxedus"
|
||||
|
||||
COPY / /themepark
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG TP_RELEASE
|
||||
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="gilbn"
|
||||
|
||||
RUN \
|
||||
echo " ## Installing packages ## " && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
python3
|
||||
curl && \
|
||||
echo "**** install theme.park ****" && \
|
||||
mkdir -p /app/themepark && \
|
||||
if [ -z ${TP_RELEASE+x} ]; then \
|
||||
TP_RELEASE=$(curl -sX GET "https://api.github.com/repos/gilbn/theme.park/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/themepark.tar.gz -L \
|
||||
"https://github.com/GilbN/theme.park/archive/refs/tags/${TP_RELEASE}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/themepark.tar.gz -C \
|
||||
/app/themepark/ --strip-components=1 && \
|
||||
cd /app/themepark && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/root/.cache \
|
||||
/tmp/* \
|
||||
/app/themepark/docker-mods \
|
||||
/app/themepark/resources/organizr
|
||||
|
||||
|
||||
# RUN mkdir -p /usr/share/nginx/html/css/
|
||||
# RUN mkdir -p /usr/share/nginx/html/resources/
|
||||
# RUN cp -R css/ /usr/share/nginx/html/css/
|
||||
# RUN cp -R resources/ /usr/share/nginx/html/resources/
|
||||
# RUN cp index.html /usr/share/nginx/html/index.html
|
||||
#rm -rf /themepark
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
24
docker/root/defaults/default
Normal file
24
docker/root/defaults/default
Normal file
@ -0,0 +1,24 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
|
||||
root /app/themepark;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
location / {
|
||||
sub_filter_types *;
|
||||
sub_filter 'https://theme-park.dev' $scheme://TP_DOMAIN;
|
||||
sub_filter 'https://develop.theme-park.dev' $scheme://TP_DOMAIN;
|
||||
sub_filter_once off;
|
||||
try_files $uri $uri/ /index.html /index.php?$args =404;
|
||||
}
|
||||
|
||||
# Don't cache
|
||||
add_header Last-Modified $date_gmt;
|
||||
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
||||
if_modified_since off;
|
||||
expires -1;
|
||||
etag off;
|
||||
}
|
20
docker/root/etc/cont-init.d/50-config
Normal file
20
docker/root/etc/cont-init.d/50-config
Normal file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
echo '------------------'
|
||||
echo '| theme.park |'
|
||||
echo '------------------'
|
||||
|
||||
# Display variables for troubleshooting
|
||||
echo -e "Variables set:\\n\
|
||||
'TP_DOMAIN'=${TP_DOMAIN}\\n"
|
||||
|
||||
if [[ -z ${TP_DOMAIN} ]]; then
|
||||
echo 'No domain set, defaulting to $http_host'
|
||||
TP_DOMAIN='$http_host'
|
||||
fi
|
||||
|
||||
DEFAULT='/config/nginx/site-confs/default'
|
||||
if ! grep -q "sub_filter 'https://theme-park.dev' \$scheme://${TP_DOMAIN};" ${DEFAULT}; then
|
||||
sed -i "s/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT}
|
||||
sed -i "s/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT}
|
||||
fi
|
Loading…
Reference in New Issue
Block a user