Skip to content

Commit

Permalink
Apply geOrchestra customizations
Browse files Browse the repository at this point in the history
relying on nx cache for building docker image

disable nx-cloud

feat: include georchestra header

df: support ENV for settings

df: set base href to ./

chore: build docker image

datafeeder - Adding a gh action to build / publish a docker image

gh-action - fixing georchestra version (docker tag)

chore: lint

chore: add thesaurus url to settings

base-ref=/impot/'

nginx - redirect onto the index.html when a UUID is present in the URL

Used the following in order to write the rule:

https://github.com/georchestra/geonetwork-ui/blob/georchestra/apps/datafeeder/src/app/app-routing.module.ts

Note:

* Not completely tested at runtime, compilation / docker image OK,
  the rewrite rule has been tested in a running docker image though.
* There is still probably some code missing JS-side to manage these
  query string after the '#' char, as reloading the page after having
  uploaded a dataset does not reload the app at the exact same place.

Concerns: This might break the usage of the docker image outside of the
official georchestra docker composition, as the redirection needs the
X-forwarded-* headers in order to work properly.

github-actions - deactivate gh-pages related actions

nginx - no redirect, just serve the index.html

npm run format:fix

fixing serving virtual routes for the JS app

somehow nginx will return a document with an "application/octet-stream"
content-type, because it probably can't figure out the type by itself.

Forcing "text/html" to be returned, so that the page is not "downloaded"
by the browser, but interpreted as a web page.

Tests: hacking the nginx configuration using the georchestra docker
composition. I was able to reload the page at the expected step once a
dataset has been uploaded.

chore: set proxy config for DF in georchestra

chore: use node 14 in docker image

change branch name in gh action

change branch name from datafeeder to georchestra-datafeeder

build(fix): fix dockerignore for datafeeder build

build(fix): raise build job timeout and formating

fixing lang calculation

some browsers seem to use the "xy-ZT" format for locates, which
obviously won't work as lookup key, as a two-char code is expected.

tests: runtime tested

implement & fix gh action to produce a docker image for the df frontend

See georchestra/georchestra#3659

Also fixes the existing action, as the branch has been renamed.

fix(nx): change defaultBase to georchestra-datafeeder branch

chore: add more to docker ignore

feat(docker): run postinstall scripts manually

This is required for Nx to build its dependency graph, and then to resolve
the result of `createGlobPatternsForDependencies` in the tailwind config

feat(header): make df header iframe configurable moving it from index.html to app.component

fix: formatting
  • Loading branch information
tonio authored and f-necas committed Nov 28, 2023
1 parent e7e9323 commit f2f5ff6
Show file tree
Hide file tree
Showing 18 changed files with 112 additions and 563 deletions.
106 changes: 0 additions & 106 deletions .github/workflows/artifacts.yml

This file was deleted.

165 changes: 0 additions & 165 deletions .github/workflows/checks.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/cleanup.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/datafeeder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

on:
push:
branches:
- georchestra-datafeeder
tags:
- '*'
jobs:
build:
if: github.repository == 'georchestra/geonetwork-ui'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 'Checking out'
uses: actions/checkout@v1

- name: Install dependencies
run: npm ci

- name: Getting image tag
if: github.repository == 'georchestra/geonetwork-ui'
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)

- name: 'Building docker image'
if: github.repository == 'georchestra/geonetwork-ui'
run: npx nx docker-build datafeeder

- name: 'Logging in to docker.io'
if: github.repository == 'georchestra/geonetwork-ui'
uses: azure/docker-login@v1
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'

- name: 'Pushing latest docker image onto docker.io'
if: github.ref == 'refs/heads/georchestra-datafeeder' && github.repository == 'georchestra/geonetwork-ui'
run: |
docker push georchestra/datafeeder-frontend:latest
- name: 'Pushing release docker image to docker.io'
if: contains(github.ref, 'refs/tags/') && github.repository == 'georchestra/geonetwork-ui'
run: |
docker tag georchestra/datafeeder-frontend:latest georchestra/datafeeder-frontend:${{ steps.version.outputs.VERSION }}
docker push georchestra/datafeeder-frontend:${{ steps.version.outputs.VERSION }}
Loading

0 comments on commit f2f5ff6

Please sign in to comment.