diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5171c54 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..afdc9fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:10 AS ui-build +WORKDIR /usr/src/ +COPY app/ ./app/ +RUN cd app && yarn install && yarn run build + +FROM node:10 AS server-build +WORKDIR /root/ +COPY --from=ui-build /usr/src/app/dist ./app/dist +# Take advantage of cached Docker layers +COPY server/package.json ./server/ +COPY server/yarn.lock ./server/ +RUN cd server && yarn install + +COPY server/ ./server/ + +EXPOSE 3080 + +CMD ["node", "./server/server.js"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2c9e168 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3.8" +services: + quelea_web: + container_name: quelea_web + build: + context: . + dockerfile: Dockerfile + ports: + - 3000:3000