# Use sizif-base as a base image. There should be most of the stuff already installed
|
FROM sizif-base:latest
|
WORKDIR /app
|
# Install any needed packages specified in requirements.txt
|
#RUN apt-get update && apt-get install -y curl gnupg
|
#RUN curl -sL https://deb.nodesource.com/setup_10.x > setup_10.x
|
#RUN npm install -g bower
|
RUN git clone https://git.penic.eu/r/havoc/berki-parse.git && git clone https://git.penic.eu/r/havoc/sizif-ocr.git -b downstairs_scanner
|
WORKDIR berki-parse
|
RUN python3 ./setup.py install
|
WORKDIR ../sizif-ocr
|
RUN python3 ./setup.py install
|
|
WORKDIR /app
|
# Copy the current directory contents into the container at /app
|
COPY . /app
|
|
RUN apt-get -y install locales-all nginx
|
RUN pip3 install gunicorn psycopg2-binary && python3 ./manage.py makemigrations && python3 ./manage.py migrate && python3 ./manage.py bower install
|
|
COPY nginx.conf /etc/nginx/sites-available/default
|
|
|
RUN python3 ./manage.py collectstatic --noinput
|
STOPSIGNAL SIGINT
|
EXPOSE 8000
|
ENV DJANGO_SETTINGS_MODULE="aoi.settings"
|
ENV LC_ALL en_US.UTF-8
|
VOLUME '/app/scans' '/app/exams' '/app/inputscans' '/app/database' '/app/settings' '/var/log/sizif/' '/app/processedscans'
|
#ENTRYPOINT ["python3", "manage.py"]
|
#CMD ["runserver", "0.0.0.0:8000"]
|
|
#CMD ["gunicorn", "--chdir", "/app", "--bind", ":8888", "aoi.wsgi:application"]
|
CMD ./entrypoint.sh
|