add heroku deployment steps

This commit is contained in:
Adam Laiacano
2020-03-21 20:43:55 -04:00
parent 9528bed0b7
commit abe9aab7f9
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -15,3 +15,10 @@ RUN yarn build
FROM nginx:mainline
COPY --from=builder /app/packages/app/build /usr/share/nginx/html
# Run nginx as root
RUN sed -i 's/user nginx.*$//' /etc/nginx/nginx.conf
# Copy in the nginx conf template and replace "$PORT" with the environment variable set by heroku
COPY default.conf.template /etc/nginx/conf.d/default.conf.template
CMD /bin/bash -c "envsubst '\$PORT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf" && nginx -g 'daemon off;'
+8
View File
@@ -0,0 +1,8 @@
server {
listen $PORT default_server;
location / {
root /usr/share/nginx/html;
index index.html;
}
}