-
Notifications
You must be signed in to change notification settings - Fork 31
/
Dockerfile
55 lines (40 loc) · 1.21 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
# pull official base image
FROM python:3.9.9-slim-buster
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# create directory for the app
RUN mkdir -p /home/app
ENV HOME=/home/app
# set work directory
ENV APP_HOME=/home/app/vaas
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
# create directory for the plugins
RUN mkdir $HOME/plugins
ENV PYTHONPATH=/home/app/plugins
VOLUME ["/home/app/plugins"]
RUN apt update \
&& apt install -y --no-install-recommends curl git default-libmysqlclient-dev build-essential default-mysql-client pkg-config
# install dependencies
RUN pip install --upgrade pip
COPY ./vaas/requirements /home/app/vaas/requirements
RUN pip install -r ./requirements/base.txt
#copy uwsgi config
COPY ./docker/uwsgi.cfg /etc/
#copy mime types used by uwsgi
COPY ./docker/mime.types /etc/
# copy project
COPY ./vaas /home/app/vaas
# copy entrypoints.sh
COPY \
docker/entrypoint-uwsgi.sh \
docker/entrypoint-uwsgi-dev.sh \
docker/entrypoint-celery-worker.sh \
docker/entrypoint-celery-routes-test.sh \
docker/entrypoint-celery-scheduler.sh \
docker/entrypoint-celery-cron-worker.sh \
docker/wait-for-it.sh \
/
# run entrypoint.sh
ENTRYPOINT ["/entrypoint-uwsgi-dev.sh"]