Skip to content

Instantly share code, notes, and snippets.

@lilac
Created September 29, 2019 03:25
Show Gist options
  • Save lilac/c4b4d971e68708fc4367768f3d23dfba to your computer and use it in GitHub Desktop.
Save lilac/c4b4d971e68708fc4367768f3d23dfba to your computer and use it in GitHub Desktop.
Run nginx on cloud run
FROM nginx
# COPY nginx.conf /etc/nginx/conf.d/default.conf
ADD run-nginx.sh .
CMD ["bash", "run-nginx.sh"]
server {
listen $NGINX_PORT;
}
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