add heroku deployment steps
This commit is contained in:
@@ -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;'
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
server {
|
||||
listen $PORT default_server;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user