-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (23 loc) · 1.06 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
FROM debian:sid
RUN echo 'deb http://mirror.psu.ac.th/debian/ sid main contrib non-free' > /etc/apt/sources.list
# RUN echo 'deb http://mirror.kku.ac.th/debian/ sid main contrib non-free' >> /etc/apt/sources.list
RUN apt update && apt upgrade -y
RUN apt install -y g++ gcc build-essential python3 python3-dev python3-pip python3-venv ca-certificates git npm locales
RUN sed -i '/th_TH.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG th_TH.UTF-8
ENV LANGUAGE th_TH:en
RUN python3 -m venv /venv
ENV PYTHON=/venv/bin/python3
# RUN $PYTHON -m pip install wheel poetry gunicorn
RUN $PYTHON -m pip install wheel poetry uwsgi
WORKDIR /app
COPY poetry.lock pyproject.toml /app/
RUN . /venv/bin/activate \
&& poetry config virtualenvs.create false \
&& poetry install --no-interaction --only main
COPY bussaya/web/static/package.json bussaya/web/static/package-lock.json bussaya/web/static/
RUN npm install --prefix bussaya/web/static
COPY . /app
ENV BUSSAYA_SETTINGS=/app/bussaya-production.cfg
EXPOSE 9000
CMD /venv/bin/uwsgi --lazy-apps --ini scripts/bussaya-uwsgi.ini