Add a production deployment
This commit is contained in:
parent
c5e6489dbf
commit
c36d179078
|
@ -0,0 +1,24 @@
|
|||
FROM node:9 as builder
|
||||
|
||||
ARG APP_DIR=/srv/howyoucanhelpus
|
||||
WORKDIR ${APP_DIR}
|
||||
|
||||
ADD package*json ${APP_DIR}/
|
||||
|
||||
RUN npm install
|
||||
|
||||
# Doing a multi-stage build to reset some stuff for a smaller image
|
||||
FROM node:9-alpine
|
||||
|
||||
ARG APP_DIR=/srv/howyoucanhelpus
|
||||
WORKDIR ${APP_DIR}
|
||||
|
||||
COPY --from=builder ${APP_DIR} .
|
||||
|
||||
COPY src ${APP_DIR}/src
|
||||
COPY config ${APP_DIR}/config
|
||||
COPY public ${APP_DIR}/public
|
||||
|
||||
EXPOSE 3030
|
||||
|
||||
CMD npm run start
|
|
@ -23,6 +23,13 @@ clean:
|
|||
watch:
|
||||
jest --watchAll
|
||||
|
||||
container: Dockerfile
|
||||
docker build -t howyoucanhelpus.azurecr.io/webapp:latest .
|
||||
|
||||
deploy: container
|
||||
docker push howyoucanhelpus.azurecr.io/webapp:latest && \
|
||||
az webapp restart -n howyoucanhelpus-docker -g hychu
|
||||
|
||||
.PHONY: all depends build clean check watch
|
||||
|
||||
# vim: set et
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>How You Can Help Us</title>
|
||||
<title>howyoucanhelp.us</title>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
<h2 class="center-text">A backend to support howyoucanhelp.us</h2>
|
||||
<h2 class="center-text">How You Can Help Us?</h2>
|
||||
|
||||
<footer>
|
||||
<p class="center-text">From the civic hackers who also built <a href="https://sonomafireinfo.org/">Sonoma Fire Info.org</a>.</p>
|
||||
<p class="center-text">From the civic-minded hackers who also built <a href="https://sonomafireinfo.org/">Sonoma Fire Info.org</a>.</p>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue