Skip to content

Commit 8b236c6

Browse files
authored
Fix SSL config docker (pterodactyl#3616)
* Don't copy default nginx config at build time * Use http.d folder for nginx configs * Add default config back * Change the panel config name
1 parent 4fa38b8 commit 8b236c6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/docker/entrypoint.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ else
3030
fi
3131

3232
echo "Checking if https is required."
33-
if [ -f /etc/nginx/conf.d/default.conf ]; then
33+
if [ -f /etc/nginx/http.d/panel.conf ]; then
3434
echo "Using nginx config already in place."
3535
if [ $LE_EMAIL ]; then
3636
echo "Checking for cert update"
@@ -42,15 +42,17 @@ else
4242
echo "Checking if letsencrypt email is set."
4343
if [ -z $LE_EMAIL ]; then
4444
echo "No letsencrypt email is set using http config."
45-
cp .github/docker/default.conf /etc/nginx/conf.d/default.conf
45+
cp .github/docker/default.conf /etc/nginx/http.d/panel.conf
4646
else
4747
echo "writing ssl config"
48-
cp .github/docker/default_ssl.conf /etc/nginx/conf.d/default.conf
48+
cp .github/docker/default_ssl.conf /etc/nginx/http.d/panel.conf
4949
echo "updating ssl config for domain"
50-
sed -i "s|<domain>|$(echo $APP_URL | sed 's~http[s]*://~~g')|g" /etc/nginx/conf.d/default.conf
50+
sed -i "s|<domain>|$(echo $APP_URL | sed 's~http[s]*://~~g')|g" /etc/nginx/http.d/panel.conf
5151
echo "generating certs"
5252
certbot certonly -d $(echo $APP_URL | sed 's~http[s]*://~~g') --standalone -m $LE_EMAIL --agree-tos -n
5353
fi
54+
echo "Removing the default nginx config"
55+
rm -rf /etc/nginx/http.d/default.conf
5456
fi
5557

5658
## check for DB up before starting the panel

0 commit comments

Comments
 (0)