-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
28 lines (21 loc) · 910 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM ubuntu:noble
RUN apt-get update -y && apt-get install -y apache2 apache2-dev libapache2-mod-wsgi-py3 python3 python3-pip
RUN pip3 install --break-system-packages mod-wsgi
RUN pip3 install --break-system-packages Jinja2
RUN pip3 install --break-system-packages pytz
RUN <<EOF
mkdir /var/ifarchive
cd /var/ifarchive
mkdir lib lib/sql lib/admintool
mkdir incoming trash logs wsgi-bin
mkdir htdocs htdocs/misc htdocs/if-archive htdocs/if-archive/unprocessed htdocs/if-archive/games
chmod -R 777 .
EOF
COPY sample.config /var/ifarchive/lib/ifarch.config
RUN sed -i 's/SecureSite = true/SecureSite = false/g' /var/ifarchive/lib/ifarch.config
COPY ifarchive-admintool.conf /etc/apache2/sites-available
COPY docker/internal-createdb.sh /var/ifarchive/wsgi-bin
RUN chmod 777 /var/ifarchive/wsgi-bin/internal-createdb.sh
RUN a2dissite 000-default
RUN a2ensite ifarchive-admintool
CMD apachectl -D FOREGROUND