forked from partio-scout/kululasku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 1019 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
29
30
31
32
FROM python:3.11
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get -y upgrade
RUN apt-get install --fix-missing -y nginx net-tools gettext libxml2-dev libxslt-dev openssl python3-lxml wkhtmltopdf
RUN mkdir /code
WORKDIR /code
RUN mkdir media static logs
#ENV PYTHONWARNINGS="always"
RUN apt-get install -y locales
RUN echo "Europe/Helsinki" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# fi_FI.UTF-8 UTF-8/fi_FI.UTF-8 UTF-8/' /etc/locale.gen && \
echo 'LANG="fi_FI.UTF-8"'>/etc/default/locale && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=fi_FI.UTF-8
RUN locale -a
RUN export LOCALE_PATHS="/usr/share/i18n"
COPY ./django_local_nginx.conf /etc/nginx/sites-available/
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code
EXPOSE 8000
COPY ./run.sh /
ENTRYPOINT ["/run.sh"]