Created
September 29, 2019 03:25
-
-
Save lilac/c4b4d971e68708fc4367768f3d23dfba to your computer and use it in GitHub Desktop.
Run nginx on cloud run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx | |
# COPY nginx.conf /etc/nginx/conf.d/default.conf | |
ADD run-nginx.sh . | |
CMD ["bash", "run-nginx.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen $NGINX_PORT; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i "s/80/${PORT}/g" /etc/nginx/conf.d/default.conf | |
# envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf | |
# exec /usr/sbin/nginx | |
exec nginx -g 'daemon off;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment