Put back entrypoint (#149)

This commit is contained in:
Salah Al Saleh
2024-03-18 11:55:31 -07:00
committed by GitHub
parent bd11003095
commit 31b03da98f
3 changed files with 13 additions and 1 deletions

View File

@@ -5,3 +5,8 @@ COPY nginx.conf /etc/nginx/nginx.conf
COPY src/favicon.ico /usr/share/nginx/html/
COPY src/index.htm /usr/share/nginx/html/
COPY src/ttlsh_files /usr/share/nginx/html/ttlsh_files/
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]

7
nginx/entrypoint.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -e
sed -i "s/__PORT__/$PORT/g" /etc/nginx/nginx.conf
exec "$@"

View File

@@ -11,7 +11,7 @@ http {
}
server {
listen <%= ENV["PORT"] %>;
listen __PORT__;
server_name _;
location / {