@ -1,22 +1,23 @@
# First, compile JS stuff
# First, compile JS stuff
FROM node
FROM node :dubnium-buster
WORKDIR /src/
WORKDIR /src/
COPY . .
COPY . .
RUN npm install -g requirejs uglify-js jade bower
RUN npm install -g requirejs uglify-js jade bower \
RUN make init js
&& make init js
# Second, create virtualenv
# Second, create virtualenv
FROM python:3 -stretch
FROM python:3 .8 -bu ste r
WORKDIR /src/
WORKDIR /src/
COPY --from= 0 /src .
COPY --from= 0 /src .
RUN apt-get -qqy update && apt-get -qqy install python3-dev sqlite3
RUN python3 -m venv /isso \
RUN python3 -m venv /isso \
&& . /isso/bin/activate \
&& . /isso/bin/activate \
&& pip install gunicorn cffi \
&& pip3 install --no-cache-dir --upgrade pip \
&& python setup.py install
&& pip3 install --no-cache-dir gunicorn cffi flask \
&& python setup.py install \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Third, create final repository
# Third, create final repository
FROM python:3 -slim-stretch
FROM python:3 .8 -slim-bu ste r
WORKDIR /isso/
WORKDIR /isso/
COPY --from= 1 /isso .
COPY --from= 1 /isso .
@ -24,7 +25,7 @@ COPY --from=1 /isso .
VOLUME /db /config
VOLUME /db /config
EXPOSE 8080
EXPOSE 8080
ENV ISSO_SETTINGS /config/isso.cfg
ENV ISSO_SETTINGS /config/isso.cfg
CMD [ "/isso/bin/gunicorn" , "-b" , "0.0.0.0:8080" , "-w" , "4" , "--preload" , "isso.run" ]
CMD [ "/isso/bin/gunicorn" , "-b" , "0.0.0.0:8080" , "-w" , "4" , "--preload" , "isso.run" , "--worker-tmp-dir" , "/dev/shm" ]
# Example of use:
# Example of use:
#
#