Skip to content

Commit

Permalink
Try minimized python manage command in backend dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
fergmac committed Dec 13, 2024
1 parent e6aaf58 commit 90bf822
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
13 changes: 7 additions & 6 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ RUN python3 -m pip install -r requirements.txt

# TODO: move to entrypoint in deployment template?
# chmod -R 777 /app && \
CMD sh -c "python3 manage.py migrate --noinput && \
./load_fixtures.sh all && \
python3 manage.py createinitialrevisions && \
python3 manage.py collectstatic --noinput && \
# python3 manage.py export --cleanup=1 --upload=1 && \
python3 manage.py runserver 0.0.0.0:8000"
CMD sh -c "python3 manage.py runserver 0.0.0.0:8000"

Check warning on line 98 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Builds (backend)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
# CMD sh -c "python3 manage.py migrate --noinput && \
# ./load_fixtures.sh all && \
# python3 manage.py createinitialrevisions && \
# python3 manage.py collectstatic --noinput && \
# # python3 manage.py export --cleanup=1 --upload=1 && \
# python3 manage.py runserver 0.0.0.0:8000"
44 changes: 22 additions & 22 deletions backend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,28 @@ parameters:
required: true
- name: SSO_TEST_CLIENT
required: true
- name: GDAL_LIBRARY_PATH
required: true
- name: GEOS_LIBRARY_PATH
required: true
- name: S3_AQUIFER_BUCKET
required: true
- name: S3_REGISTRANT_BUCKET
required: true
- name: S3_PRIVATE_ROOT_BUCKET
required: true
- name: S3_PRIVATE_AQUIFER_BUCKET
required: true
- name: S3_PRIVATE_REGISTRANT_BUCKET
required: true
- name: S3_PRIVATE_WELL_BUCKET
required: true
- name: ENABLE_AQUIFERS_SEARCH
required: true
- name: EMAIL_NOTIFICATION_RECIPIENT
required: true
- name: GEOCODER_ADDRESS_API_BASE
required: true
# - name: GDAL_LIBRARY_PATH
# required: true
# - name: GEOS_LIBRARY_PATH
# required: true
# - name: S3_AQUIFER_BUCKET
# required: true
# - name: S3_REGISTRANT_BUCKET
# required: true
# - name: S3_PRIVATE_ROOT_BUCKET
# required: true
# - name: S3_PRIVATE_AQUIFER_BUCKET
# required: true
# - name: S3_PRIVATE_REGISTRANT_BUCKET
# required: true
# - name: S3_PRIVATE_WELL_BUCKET
# required: true
# - name: ENABLE_AQUIFERS_SEARCH
# required: true
# - name: EMAIL_NOTIFICATION_RECIPIENT
# required: true
# - name: GEOCODER_ADDRESS_API_BASE
# required: true
objects:
- kind: ConfigMap
apiVersion: v1
Expand Down

0 comments on commit 90bf822

Please sign in to comment.