diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a158b850..73a21a92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: run: npm i - name: Run docker-build - run: npx nx docker-build datahub + run: npx nx docker-build mel-datahub - uses: docker/login-action@v1 name: Login to GitHub Container Registry diff --git a/apps/datahub/project.json b/apps/datahub/project.json index c52e6929..0ed9a41f 100644 --- a/apps/datahub/project.json +++ b/apps/datahub/project.json @@ -98,8 +98,8 @@ "executor": "nx:run-commands", "options": { "commands": [ - "nx build datahub", - "docker build --build-arg APP_NAME=datahub -f ./tools/docker/Dockerfile . -t ghcr.io/camptocamp/mel-dataplatform/datahub:latest" + "nx build mel-datahub", + "docker build --build-arg APP_NAME=plateforme -f ./tools/docker/Dockerfile . -t ghcr.io/camptocamp/mel-dataplatform/datahub:latest" ], "parallel": false } diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 57641d5a..4e46e304 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -11,12 +11,11 @@ ENV CONFIG_DIRECTORY_OVERRIDE "" ENV ASSETS_DIRECTORY_OVERRIDE "" ENV CUSTOM_SCRIPTS_DIRECTORY "" -COPY dist/apps/datahub /usr/share/nginx/html/datahub +COPY dist/apps/datahub /usr/share/nginx/html/plateforme COPY tools/docker/docker-entrypoint.sh / # copy default NGINX conf & put the app name in it COPY tools/docker/nginx.conf /etc/nginx/conf.d/default.conf -RUN sed -i "s/APP_NAME/datahub/" /etc/nginx/conf.d/default.conf EXPOSE 80 diff --git a/tools/docker/nginx.conf b/tools/docker/nginx.conf index 3460467d..205a8543 100644 --- a/tools/docker/nginx.conf +++ b/tools/docker/nginx.conf @@ -17,7 +17,7 @@ server { } location / { - try_files $uri $uri/ /APP_NAME/index.html; + try_files $uri $uri/ /plateforme/index.html; add_header Cache-Control 'max-age=86400'; # 24h }