Skip to content

Commit e9983a9

Browse files
add env variables to Dockerfile
1 parent 908f3df commit e9983a9

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ ENV PATH=/venv/bin:/usr/local/bin/:/usr/bin:/bin \
131131
PGSSLCERT="/tmp/postgresql.crt" \
132132
UV_PROJECT_ENVIRONMENT=/venv \
133133
VIRTUAL_ENV=/venv \
134-
UWSGI_PROCESSES=4
134+
UWSGI_PROCESSES=4 \
135+
MEDIA_ROOT="${MEDIA_ROOT:-/var/run/app/media}" \
136+
STATIC_ROOT="${STATIC_ROOT:-/var/run/app/static}"
135137

136138
RUN <<EOF cat> /RELEASE
137139
{"version": "$VERSION",

docker/bin/docker-entrypoint.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/bin/sh -e
22

33

4-
export MEDIA_ROOT="${MEDIA_ROOT:-/var/run/app/media}"
5-
export STATIC_ROOT="${STATIC_ROOT:-/var/run/app/static}"
64
export UWSGI_PROCESSES="${UWSGI_PROCESSES:-"4"}"
75
export DJANGO_SETTINGS_MODULE="country_workspace.config.settings"
86
mkdir -p "${MEDIA_ROOT}" "${STATIC_ROOT}" || echo "Cannot create dirs ${MEDIA_ROOT} ${STATIC_ROOT}"

tests/contrib/aurora/test_aurora_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pytest
55
import requests
66
import responses
7+
from constance.test import override_config
78

89
from country_workspace.contrib.aurora.client import AuroraClient
910
from country_workspace.exceptions import RemoteError
@@ -23,14 +24,15 @@
2324
("json_decode", 200, "invalid json", lambda url: f"Wrong JSON response fetching {url}"),
2425
],
2526
)
27+
@override_config(AURORA_API_URL="https://hope-dummy.org/api/rest", AURORA_API_TOKEN="dummy_token")
2628
def test_client_exceptions(
2729
mocked_responses: responses.RequestsMock,
2830
error_case: str,
2931
status_code: int,
3032
body: dict | str,
3133
expected_error: Callable[[str], str],
3234
) -> None:
33-
client = AuroraClient(token="dummy")
35+
client = AuroraClient()
3436
path = "dummy_path"
3537
url = client._get_url(path)
3638

tests/contrib/hope/test_hope_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# tests/test_hope_client.py
21
import re
32
from collections.abc import Callable
43
from unittest.mock import Mock

0 commit comments

Comments
 (0)