add docker

This commit is contained in:
Alberto Xamin 2020-11-21 17:37:42 +01:00
parent 863725914c
commit db3b07e8e0
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 30 additions and 0 deletions

8
backend/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM python:3.7-slim-stretch
WORKDIR /code
COPY * /code/
RUN pip install -r requirements.txt
EXPOSE 5001
ENTRYPOINT ["python", "/code/__init__.py"]

22
frontend/Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM node:lts-alpine
# install simple http server for serving static content
RUN npm install -g http-server
# make the 'app' folder the current working directory
WORKDIR /app
# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./
# install project dependencies
RUN npm install
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# build app for production with minification
RUN npm run build
EXPOSE 8080
CMD [ "http-server", "dist" ]