File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3.9.6-alpine as builder
1+ FROM python:3.8.3
22ENV PYTHONUNBUFFERED 1
3- ENV PYTHONDONTWRITEBYTECODE 1
43ARG SOURCE_COMMIT
5-
6- RUN apk update && apk upgrade && \
7- apk add --no-cache bash git gcc openssl-dev libffi-dev postgresql-dev python3-dev musl-dev cargo
8-
9- RUN pip install --upgrade pip
10-
114RUN mkdir /code
12- WORKDIR /code
135ADD requirements.txt /code/
14-
15- RUN pip wheel --no-cache-dir --wheel-dir /code/wheels -r requirements.txt
16-
17- FROM python:3.9.6-alpine
18-
19- RUN addgroup -S ocl && adduser -S ocl -G ocl
20-
21- ENV APP_HOME=/home/ocl/code
22-
23- RUN mkdir -p $APP_HOME
24- WORKDIR $APP_HOME
25-
26- RUN apk update && apk add --no-cache libpq bash
27- COPY --from=builder /code/wheels /wheels
28- COPY --from=builder /code/requirements.txt .
29- RUN pip install --no-cache /wheels/*
30- RUN rm -rf /wheels
31-
32- ADD --chown=ocl:ocl . $APP_HOME
33-
34- USER ocl
6+ WORKDIR /code
7+ RUN pip install packaging
8+ RUN pip install -r requirements.txt
9+ ADD . /code/
3510
3611RUN chmod +x set_build_version.sh
3712RUN ["bash" , "-c" , "./set_build_version.sh" ]
@@ -42,5 +17,4 @@ RUN chmod +x start_celery_worker.sh
4217RUN chmod +x ping_celery_worker.sh
4318RUN chmod +x start_flower.sh
4419EXPOSE 8000
45-
4620CMD ["bash" , "-c" , "./startup.sh" ]
Original file line number Diff line number Diff line change 11Django == 3.1.12
22psycopg2 == 2.8.5
3- gunicorn == 20.1.0
43djangorestframework == 3.11.2
54pylint == 2.5.3
65pydash == 4.8.0
@@ -18,7 +17,7 @@ celery[redis]==4.4.7
1817celery_once == 3.0.1
1918flower == 0.9.5
2019redis == 3.5.3
21- kombu == 4.6.11
20+ kombu == 4.5.0
2221django-elasticsearch-dsl == 7.1.4
2322drf-yasg == 1.17.1
2423git+https://github.com/snyaggarwal/django-queryset-csv
Original file line number Diff line number Diff line change @@ -21,10 +21,5 @@ python manage.py import_lookup_values
2121echo " Populating text from extras.about"
2222python manage.py populate_text_from_extras_about
2323
24- if [[ " $ENVIRONMENT " = " development" ]]; then
25- echo " Starting up the development server"
26- python manage.py runserver 0.0.0.0:${API_PORT:- 8000}
27- else
28- echo " Starting up the production server"
29- gunicorn core.wsgi:application --bind 0.0.0.0:${API_PORT:- 8000}
30- fi
24+ echo " Starting up the server"
25+ python manage.py runserver 0.0.0.0:${API_PORT:- 8000}
You can’t perform that action at this time.
0 commit comments