Skip to content

Commit

Permalink
Put back entrypoint (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh authored Mar 18, 2024
1 parent bd11003 commit 31b03da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 7 additions & 0 deletions nginx/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

sed -i "s/__PORT__/$PORT/g" /etc/nginx/nginx.conf

exec "$@"
2 changes: 1 addition & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ http {
}

server {
listen <%= ENV["PORT"] %>;
listen __PORT__;
server_name _;

location / {
Expand Down

0 comments on commit 31b03da

Please sign in to comment.