-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (42 loc) · 1.42 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM python:3.9-slim
WORKDIR /app
# Install basic SO and Python
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
python-dev \
wget curl vim locales zip unzip apt-utils \
wait-for-it \
&& rm -rf /var/lib/apt/lists/* \
&& pip install uwsgi uwsgitop
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh && \
echo "export LS_OPTIONS='--color=auto'" >>~/.bashrc && \
echo "eval "\`dircolors\`"" >>~/.bashrc && \
echo "alias ls='ls \$LS_OPTIONS'" >>~/.bashrc && \
echo "alias ll='ls \$LS_OPTIONS -l'" >>~/.bashrc && \
echo "alias l='ls \$LS_OPTIONS -lA'" >>~/.bashrc
# Install Node 14 e NPM
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g [email protected]
RUN mkdir /dkdata
#### Prepare BACKEND Django API
COPY requirements.txt ./
RUN pip install -r requirements.txt
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONIOENCODING=UTF-8
#### Prepare Frontend Vuejs + Nuxt App
COPY ./frontend/package.json ./frontend/package-lock.json ./frontend/
RUN cd frontend && npm install \
&& npm cache clean --force \
&& npm cache verify
COPY ./frontend ./frontend
RUN cd frontend && npm run build
ENV SHELL=/bin/bash LANG=en_US.UTF-8
COPY . ./
EXPOSE 8000
# COPY docker/bin/* /usr/bin/
CMD ["./docker/bin/start_dev.sh"]