-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
46 lines (35 loc) · 1.39 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.10-bullseye
ENV DJANGO_SUPERUSER_USERNAME XXX
ENV DJANGO_SUPERUSER_PASSWORD XXX
ENV DJANGO_SUPERUSER_EMAIL XXX
ENV REACT_APP_HOST_PORT_COMPLETE http://127.0.0.1:8000
ENV SMTP_USERNAME XXX [email protected]
ENV SMTP_PASSWORD XXX
ENV HOST localhost
RUN mkdir /var/www
RUN mkdir /var/www/static
RUN mkdir -p /var/www/log/supervisor
RUN mkdir -p /etc/supervisor/conf.d
RUN mkdir -p /etc/nginx
RUN mkdir -p /opt/webserver/run/
COPY . /var/www
WORKDIR /var
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install wget software-properties-common build-essential libnss3-dev zlib1g-dev libgdbm-dev libncurses5-dev libssl-dev libffi-dev libreadline-dev libsqlite3-dev libbz2-dev -y
RUN apt-get install default-libmysqlclient-dev -y
RUN #wget https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz
RUN #tar xvf Python-3.9.10.tgz
RUN #./Python-3.9.10/configure --enable-optimizations
RUN #make altinstall
RUN /usr/local/bin/python3 -m pip install --upgrade pip
RUN apt-get install nginx -y
RUN apt-get install supervisor -y
WORKDIR /var/www
RUN python3 -m pip install -r requirements.txt
RUN cp -ar react-ui/build/. react/
RUN cp /var/www/config/nginx.conf /etc/nginx/nginx.conf
RUN cp /var/www/config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# start supervisor
CMD ["/usr/bin/supervisord", "-n", "-e", "debug", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
EXPOSE 80