Last active
February 1, 2019 10:34
-
-
Save bronger/e14616cbd3b9786363bfe1d47df46e89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
LABEL maintainer="Torsten Bronger <[email protected]>" | |
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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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