This provides a server for the domain lindas.admin.ch and also ld.admin.ch.
- Website of lindas.admin.ch
- Dereferencing of
https://lindas.admin.ch/*
andhttps://ld.admin.ch/*
You need to have Docker installed.
docker build -t lindas-admin-ch .
docker run --rm -p 8080:8080 lindas-admin-ch
Simple changes can be done through clicking on the (c) symbol on the bottom of the page, followed by mergin them on the subsequent web page.
The web pages are in ./views defined with and need to be referenced themselfs in the Routing below. Best is to copy a basic site (e.g. publish.html) to start a new web page.
The web pages themself do refer in the code for the content to the multilingual versions of Markdown formated files in ./content. (It is important to use the same name for the _.html and _.md similar that the link from (c) works.)
The paths and the menu is specified in ./config.json:
- Routing:
staticViews
Describes the URL paths and the files. - Navigation:
content.navigation
Describe the menu entries, titles and URL paths. (The titles are translated in /locales with the keynavigation
prefixed.)
All other non-page wide translations are done through the files in /locales
There are three different environments:
- test (TEST),
- integration (INT),
- production (PROD).
CI is configured for two branches: main
and develop
.
The idea is to always deploy on INT before PROD.
Everything that is on develop
is deployed on TEST.
If something needs to be deployed quickly on PROD, there is no need to go through TEST first ; INT -> PROD is enough for such situations.
Every commit to develop
branch creates a new test_<date_time>
container image.
The gitops-main detects new images and deploys them automatically to https://test.lindas.admin.ch.
Every commit to main
branch creates a new int_<date_time>
container image.
The gitops-main detects new images and deploys them automatically to https://int.lindas.admin.ch.
To push the current version that is deployed on integration to production:
- Go to the Actions tab.
- On the left, select the
CI Workflow
workflow. - You will see a table of all past runs of that workflow. On the first line, there is a select called
Run workflow
. Click on it, make suremain
is the selected branch, and click theRun workflow
button.
It is important to make sure that the deployed instances are working as expected. For this, some tests are in place, in order to prevent most of the issues already.
Right now, some basic tests are run to check that the Trifid instance is able to start. If the tests are failing, nothing will be deployed, as this will make the pipeline fail.
You can also try those checks locally:
npm run test
It is also possible to trigger a manual action to test the current deployed instances on all environments.
For this, follow those steps:
- Go to the Actions tab.
- On the left, select the
Manual Test
workflow. - You will see a table of all past runs of that workflow. On the first line, there is a select called
Run workflow
. Click on it, make suremain
is the selected branch, select the environment you want to check, and click theRun workflow
button.
This allows you to check the current deployed version on the selected environment and notice any error. If the error is coming from a new change, the best thing to do is to revert the change and fix it before deploying again.
Those checks are not run on any commit in the default pipeline, as if the store is not reachable, it will make the pipeline fail and will block any deployment.