Prognostic calculator website for spine metastatic cancer patients.
https://hal.elte.hu/gerincmet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
949 B
39 lines
949 B
ARG pyversion=3.9
|
|
FROM python:${pyversion}-bullseye
|
|
ARG pyversion=3.9
|
|
ENV PYVERSION ${pyversion:-3.9}
|
|
|
|
# Install packages
|
|
RUN apt-get -yqq update && \
|
|
apt-get -yqq install apache2 apache2-dev locales libapache2-mod-wsgi-py3 && \
|
|
apt-get clean
|
|
|
|
# Install locale
|
|
COPY ./locale.gen /etc/locale.gen
|
|
RUN locale-gen
|
|
|
|
COPY gerincmet/prog_calc /var/www/html/gerincmet/prog_calc
|
|
|
|
RUN chown -R www-data:www-data /var/www/
|
|
RUN chmod -R 755 /var/www/
|
|
|
|
USER www-data
|
|
|
|
# Prepare virtualenv
|
|
WORKDIR /var/www/html/gerincmet/prog_calc/prog_calc/
|
|
COPY ./requirements.txt .
|
|
RUN python3 -m venv ./venv
|
|
RUN . ./venv/bin/activate
|
|
RUN ./venv/bin/pip install --upgrade pip setuptools
|
|
RUN ./venv/bin/pip install -r ./requirements.txt
|
|
|
|
# Configure Apache
|
|
USER root
|
|
COPY ./start-apache.sh /
|
|
RUN a2dismod mpm_event && a2enmod mpm_prefork
|
|
COPY ./prog-calc.conf /etc/apache2/sites-available/000-default.conf
|
|
|
|
# Start Apache
|
|
EXPOSE 80
|
|
CMD ["/bin/sh", "/start-apache.sh"]
|
|
|
|
|