Add docker support

This commit is contained in:
Michael Thomas 2021-09-28 21:39:49 -04:00
parent 6d4bd317a8
commit d8a398970f
3 changed files with 29 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
node_modules
npm-debug.log

18
Dockerfile Normal file
View File

@ -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"]

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: "3.8"
services:
quelea_web:
container_name: quelea_web
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000