-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
40 lines (31 loc) · 1.01 KB
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
FROM python:3.10.16
# install dependenices
ARG DOCTL_VERSION=1.120.0
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y vim default-mysql-client openssl curl memcached && \
curl -sSL https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.tar.gz \
| tar -xz -C /usr/local/bin doctl
WORKDIR /var/www/tab
COPY Pipfile ./
COPY Pipfile.lock ./
COPY package.json ./
COPY package-lock.json ./
COPY manage.py ./
COPY setup.py ./
COPY webpack.config.js ./
COPY ./settings ./settings
COPY ./mittab ./mittab
COPY ./bin ./bin
COPY ./assets ./assets
RUN pip install pipenv
RUN pipenv install --deploy --system
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash
RUN apt-get install -y nodejs aptitude
RUN aptitude install -y npm
RUN npm install
RUN ./node_modules/.bin/webpack --config webpack.config.js --mode production
RUN python manage.py collectstatic --noinput
RUN mkdir /var/tmp/django_cache
EXPOSE 8000
CMD ["/var/www/tab/bin/start-server.sh"]