This is an automated email from the ASF dual-hosted git repository. machristie pushed a commit to branch fix-django-dockerfile in repository https://gitbox.apache.org/repos/asf/airavata-custos-portal.git
commit eabab17e42d2c294c2f24bbca45faa3dd7d65f35 Author: Marcus Christie <[email protected]> AuthorDate: Wed Apr 5 11:04:48 2023 -0400 Fix Dockerfile build --- Dockerfile | 6 ++++-- airavata_custos_portal/settings.py | 26 +++++++++++++------------- requirements.txt | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index d973bfe..ea0a49f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # build stage -FROM node:14-alpine as build-stage +FROM node:14 as build-stage WORKDIR /app COPY package.json yarn.lock ./ RUN yarn @@ -15,7 +15,9 @@ RUN mkdir /django COPY requirements.txt /django/ RUN python3 -m pip install --upgrade pip setuptools wheel --no-cache RUN python3 -m pip install -r /django/requirements.txt --no-cache -COPY --from=build-stage /app/airavata_custos_portal /django +RUN mkdir /django/airavata_custos_portal +COPY --from=build-stage /app/airavata_custos_portal /django/airavata_custos_portal +COPY --from=build-stage /app/manage.py /django/ WORKDIR /django ENV DJANGO_DEBUG=false ENV DJANGO_STATIC_ROOT=/usr/share/nginx/html/static diff --git a/airavata_custos_portal/settings.py b/airavata_custos_portal/settings.py index 13a63f8..8096b71 100644 --- a/airavata_custos_portal/settings.py +++ b/airavata_custos_portal/settings.py @@ -136,13 +136,13 @@ WEBPACK_LOADER = { "FRONTEND": { "BUNDLE_DIR_NAME": "airavata_custos_portal_frontend/dist/", "STATS_FILE": BASE_DIR - / "airavata_custos_portal" - / "apps" - / "frontend" - / "static" - / "airavata_custos_portal_frontend" - / "dist" - / "webpack-stats.json", + / "airavata_custos_portal" + / "apps" + / "frontend" + / "static" + / "airavata_custos_portal_frontend" + / "dist" + / "webpack-stats.json", "TIMEOUT": 60, }, } @@ -157,10 +157,10 @@ REST_FRAMEWORK = { env = environ.Env() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -environ.Env.read_env('.env') +environ.Env.read_env(".env") -CUSTOS_CLIENT_ID = env("CUSTOS_CLIENT_ID") -CUSTOS_CLIENT_SEC = env("CUSTOS_CLIENT_SEC") -CUSTOS_API_URL = env("CUSTOS_API_URL") -CUSTOS_SUPER_CLIENT_ID = env("CUSTOS_SUPER_CLIENT_ID") -UNDER_MAINTENANCE = env("UNDER_MAINTENANCE") +CUSTOS_CLIENT_ID = env("CUSTOS_CLIENT_ID", default="") +CUSTOS_CLIENT_SEC = env("CUSTOS_CLIENT_SEC", default="") +CUSTOS_API_URL = env("CUSTOS_API_URL", default="") +CUSTOS_SUPER_CLIENT_ID = env("CUSTOS_SUPER_CLIENT_ID", default="") +UNDER_MAINTENANCE = env("UNDER_MAINTENANCE", default="") diff --git a/requirements.txt b/requirements.txt index 70f4008..c62fcd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ Django==3.2.16 django-webpack-loader==0.6.0 djangorestframework==3.14.0 requests==2.28.2 -PyJWT==0.4.3 +PyJWT==2.6.0 django-environ
