File tree 7 files changed +51
-3
lines changed
7 files changed +51
-3
lines changed Original file line number Diff line number Diff line change
1
+ .gitignore
2
+ .git
3
+ .vscode
4
+ .lgtm.yml
5
+ __pycache__
6
+ venv /
7
+ ** /build
8
+ .env
9
+ docker /env_file_ *
10
+ docker /custom.override.yml
11
+ ** /docker-compose. *
12
+ docs /
13
+ frontend /node_modules
14
+ frontend /dist
15
+ frontend /build
16
+ docker-compose *
17
+ .pre-commit-config.yaml
18
+ .ipython /
Original file line number Diff line number Diff line change @@ -29,20 +29,22 @@ RUN mkdir -p ${LOG_PATH} \
29
29
&& apk --no-cache -U add bash py3-psycopg2 gcc python3-dev alpine-sdk linux-headers \
30
30
&& pip3 install --no-cache-dir --upgrade pip
31
31
32
+ COPY requirements/project-requirements.txt $PYTHONPATH/project-requirements.txt
32
33
WORKDIR $PYTHONPATH
34
+ RUN pip3 install --no-cache-dir --compile -r $PYTHONPATH/project-requirements.txt
35
+
33
36
COPY . $PYTHONPATH
34
37
COPY --from=frontend-build /build /var/www/reactapp
35
38
36
39
# separation is required to avoid to re-execute os installation in case of change of python requirements
37
- RUN pip3 install --no-cache-dir --compile -r $PYTHONPATH/requirements/project-requirements.txt \
38
- && touch ${LOG_PATH}/django/api.log ${LOG_PATH}/django/api_errors.log \
40
+ RUN touch ${LOG_PATH}/django/api.log ${LOG_PATH}/django/api_errors.log \
39
41
&& touch ${LOG_PATH}/django/greedybear.log ${LOG_PATH}/django/greedybear_errors.log \
40
42
&& touch ${LOG_PATH}/django/celery.log ${LOG_PATH}/django/celery_errors.log \
41
43
&& touch ${LOG_PATH}/django/django_errors.log ${LOG_PATH}/django/elasticsearch.log\
42
44
&& touch ${LOG_PATH}/django/authentication.log ${LOG_PATH}/django/authentication_errors.log \
43
45
&& adduser -S -H -u 2000 -D -g www-data www-data \
44
46
&& chown -R www-data:www-data ${LOG_PATH} /opt/deploy/ \
45
- && rm -rf docs/ frontend/ tests/ .github/ \
47
+ && rm -rf docs/ frontend/ tests/ .github/ docker/hooks/ \
46
48
&& /bin/bash ./docker/watchman_install.sh \
47
49
&& apk del gcc python3-dev alpine-sdk linux-headers
48
50
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " display path"
4
+ echo " $( pwd) "
5
+ echo " display dockerfile path"
6
+ echo $DOCKERFILE_PATH
7
+ cd ..
8
+ echo " display path"
9
+ echo " $( pwd) "
10
+ echo " current branch"
11
+ echo " $SOURCE_BRANCH "
12
+
13
+ if [[ " $SOURCE_BRANCH " == " main" ]]; then
14
+ echo " The branch is main, proceeding with multi-arch build"
15
+ docker buildx create --name multiarch --use
16
+ docker buildx build -f " $DOCKERFILE_PATH " -t " $IMAGE_NAME " --platform linux/arm64,linux/amd64,windows-amd64 --push .
17
+ else
18
+ echo " The branch is not main, proceeding with classic build"
19
+ docker buildx build -f " $DOCKERFILE_PATH " -t " $IMAGE_NAME " --push .
20
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [[ " $SOURCE_BRANCH " == " main" ]]; then
4
+ curl -d " text=A new production image has been pushed to Docker Hub" -d " channel=$SLACK_CHANNEL " -H " Authorization: Bearer $SLACK_TOKEN " -X POST https://slack.com/api/chat.postMessage
5
+ fi
Original file line number Diff line number Diff line change 2
2
daily
3
3
missingok
4
4
rotate 2
5
+ size 10M
5
6
compress
6
7
delaycompress
7
8
notifempty
Original file line number Diff line number Diff line change 2
2
daily
3
3
missingok
4
4
rotate 2
5
+ size 10M
5
6
compress
6
7
delaycompress
7
8
notifempty
Original file line number Diff line number Diff line change 2
2
daily
3
3
missingok
4
4
rotate 8
5
+ size 1M
5
6
compress
6
7
delaycompress
7
8
notifempty
You can’t perform that action at this time.
0 commit comments