Skip to content

Commit

Permalink
[#474] Test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmursa-dev committed Jan 2, 2025
1 parent 4abc18d commit 5d55de7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,21 @@ USER user

ARG COMMIT_HASH
ARG RELEASE
ARG TEST_MAYK

ENV COMMIT_HASH=${COMMIT_HASH}
ENV RELEASE=${RELEASE}
ENV COMMIT_HASH='1234'
ENV RELEASE='1112222'

ENV TEST_MAYKIN=CIAO
ENV TEST_MAYK='daniel'

RUN echo "----- ENV VARIABLES -----" \
&& echo "COMMIT_HASH: $COMMIT_HASH" \
&& echo "RELEASE: $RELEASE" \
&& echo "----- END -----"

ENV VAR1=value1
ENV VAR2=value2

ENV DJANGO_SETTINGS_MODULE=objects.conf.docker

ARG SECRET_KEY=dummy
Expand Down
6 changes: 6 additions & 0 deletions bin/docker_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ ${SCRIPTPATH}/wait_for_db.sh

>&2 echo "Database is up."

>&2 echo "---------------"
>&2 echo "COMMIT_HASH: $COMMIT_HASH"
>&2 echo "TEST_MAYK: $TEST_MAYK"
>&2 echo "RELEASE: $RELEASE"
>&2 echo "---------------"

# Apply database migrations
>&2 echo "Apply database migrations"
python src/manage.py migrate
Expand Down
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ services:
CELERY_LOGLEVEL: DEBUG
DISABLE_2FA: ${DISABLE_2FA:-yes}
SUBPATH: ${SUBPATH}
command: >
sh -c "echo 'COMMIT_HASH: $COMMIT_HASH'; echo 'TEST_MAYKIN: $TEST_MAYKIN';
echo 'RELEASE: $RELEASE'; "
healthcheck:
test: ["CMD", "python", "-c", "import requests; exit(requests.head('http://localhost:8000/admin/').status_code not in [200, 302])"]
interval: 30s
Expand Down

0 comments on commit 5d55de7

Please sign in to comment.