-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (22 loc) · 843 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
FROM debian:buster
# Apt dependencies
RUN apt-get update && apt-get install -y \
apache2 \
libapache2-mod-wsgi-py3 \
python3-venv
COPY --chown=www-data:www-data ./frontend/build /var/www/html/
COPY --chown=www-data:www-data ./backend /var/www/bring-a-plate/
# Re-build python virtualenv (contains abolute paths; best to exclude anything added locally)
RUN (cd /var/www/bring-a-plate/ && \
python3 -m venv venv && \
./venv/bin/pip install -r requirements.txt)
# Prepare apache to host as WSGI app
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_RUN_GROUP www-data
ENV APACHE_RUN_USER www-data
ADD deploy/000-default.conf /etc/apache2/sites-available/000-default.conf
EXPOSE 80
ENTRYPOINT ["/usr/sbin/apache2"]
CMD ["-D", "FOREGROUND"]