Skip to content

Instantly share code, notes, and snippets.

@bronger
Last active February 1, 2019 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bronger/e14616cbd3b9786363bfe1d47df46e89 to your computer and use it in GitHub Desktop.
Save bronger/e14616cbd3b9786363bfe1d47df46e89 to your computer and use it in GitHub Desktop.
FROM ubuntu
LABEL maintainer="Torsten Bronger <bronger@physik.rwth-aachen.de>"
ARG TERM=linux
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
apache2 \
build-essential \
curl \
git \
libapache2-mod-wsgi-py3 \
libldap2-dev \
libsasl2-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
pandoc \
python3 \
python3-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
python3-wheel \
python3-yaml \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir rdmo django-auth-ldap
RUN a2enmod ssl headers
RUN mkdir -p /var/run/apache2
RUN git clone https://github.com/rdmorganiser/rdmo-app.git /var/www/rdmo-app
WORKDIR /var/www/rdmo-app
RUN mkdir -p static_root/CACHE && chown www-data:www-data static_root/CACHE
COPY local.py config/settings/
RUN python3 manage.py download_vendor_files
COPY theme theme
RUN python3 manage.py collectstatic --no-input
EXPOSE 80 443
ENTRYPOINT ["sh", "-c", ". /etc/apache2/envvars && exec apache2 -D FOREGROUND"]
import os
BASE_DIR = "/var/www/rdmo-app"
SECRET_KEY = "this is not a very secret key"
THEME_DIR = os.path.join(BASE_DIR, 'theme')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment