diff --git a/README.md b/README.md new file mode 100644 index 0000000..c9d3841 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# PDFer + +Write a letter in the browser, let the backend generate a PDF out of it. diff --git a/client/Dockerfile b/client/Dockerfile new file mode 100644 index 0000000..df16308 --- /dev/null +++ b/client/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:alpine +COPY ./build /usr/share/nginx/html +COPY ./api.conf /etc/nginx/conf.d/ diff --git a/client/api.conf b/client/api.conf new file mode 100644 index 0000000..a77f972 --- /dev/null +++ b/client/api.conf @@ -0,0 +1,4 @@ +location /api/ { + proxy_pass http://127.0.0.1:5000; + proxy_set_header Host $host; +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f99150e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '2' +services: + backend: + build: ./server + ports: + - "5000" + web: + build: ./client + links: + - backend + ports: + - "80:9999" diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..423e34f --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,4 @@ +FROM mhart/alpine-node:7.6 +ADD . /code +WORKDIR /code +CMD ["node", "index.js"]