-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.dev
49 lines (28 loc) · 1.09 KB
/
Dockerfile.dev
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
46
47
48
49
FROM ubuntu:latest
EXPOSE 80
WORKDIR /app
ENV LANG=C.UTF-8
# installing deps
RUN apt-get update --fix-missing
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y supervisor python3 python3-pip ipset iptables sudo nginx sass
COPY requirements.txt /app/
RUN pip3 install -r requirements.txt
COPY langate2000-supervisor.conf /etc/supervisor/supervisord.conf
# nginx setup
COPY langate2000-nginx.conf /etc/nginx/sites-enabled/default
RUN mkdir -p /var/www/html/static
# netcontrol
ADD langate2000-netcontrol /app/langate2000-netcontrol
# theming
ADD theming /app/theming
WORKDIR /app/theming/
RUN sass insalan.scss langate.css
# django
ADD langate /app/langate
RUN cp /app/theming/langate.css /app/langate/static/css/
WORKDIR /app/langate/
RUN python3 manage.py makemigrations --noinput
RUN python3 manage.py migrate --noinput
RUN python3 manage.py collectstatic --noinput
RUN echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('root', '', 'rien')" | python3 manage.py shell
CMD [ "supervisord", "-c", "/etc/supervisor/supervisord.conf" ]