move and change dockerfiles

This commit is contained in:
Stanislaw-Golebiewski 2020-01-12 20:09:12 +01:00
parent 885d8583ab
commit cbedfbe4fb
3 changed files with 63 additions and 0 deletions

28
bk_api/api.dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM python:3.6
LABEL maintainer="Stanisław Gołębiewski <stagol@st.amu.edu.pl>"
RUN apt-get update \
&& apt-get -y install \
tesseract-ocr \
tesseract-ocr-jpn \
&& apt-get clean
WORKDIR /opt/app
# COPY . /opt/app/
COPY ./Pipfile /opt/app/Pipfile
RUN pip3 install pipenv_to_requirements gunicorn && \
pipenv run pipenv_to_requirements && \
pip3 install --no-cache -r requirements.txt
COPY . /opt/app/
RUN mv ./ocr_module/tesseract_data/pol.traineddata /usr/share/tesseract-ocr/4.00/tessdata && \
touch db.sqlite3
CMD exec gunicorn bk_api.wsgi:application --bind 0.0.0.0:8000 --workers 3

1
bk_webapp/.dockerignore Normal file
View File

@ -0,0 +1 @@
node_modules/

View File

@ -0,0 +1,34 @@
FROM node:11.6-alpine
LABEL maintainer="Stanisław Gołębiewski <stagol@st.amu.edu.pl>"
RUN apk update && \
apk upgrade && \
apk add --no-cache tini \
make \
python2 \
g++ \
gcc \
libgcc \
libstdc++ \
linux-headers \
python
WORKDIR /opt/app/
# COPY ./bk_webapp ./app
COPY ./package.json .
RUN npm install && npm install -g serve
COPY . /opt/app/
RUN npm run build
# ENV PATH /data/node_modules/.bin:$PATH
# WORKDIR /opt/app
ENTRYPOINT ["/sbin/tini", "--"]
CMD serve -l tcp://0.0.0.0:3000 -s build