Web Server for ezmaster
- Add the application in your ezmaster (inistcnrs/ezmaster-webserver:5.1.3) then create a new instance
- To configure your web server
- To serve content, just upload your files into
/www
To sync with git repo, just change the config :
{
"environnement": {
"NODE_ENV": "production",
"CRON_VERBOSE": true,
"GIT_REPOSITORY": "https://github.com/Inist-CNRS/lodex-extented",
"GIT_BRANCH": "v3"
},
"tasks": [
{
"when": "30 * * * *",
"execute": "/app/gitsync $GIT_REPOSITORY $GIT_BRANCH"
}
]
}
To sync with a directory within a monorepo, use:
{
"environnement": {
"NODE_ENV": "production",
"CRON_VERBOSE": true,
"GIT_REPOSITORY": "https://gitbucket.inist.fr/git/tdm/web-services.git",
"GIT_BRANCH": "master",
"GIT_DIRECTORY": "www-home"
},
"tasks": [{
"when": "30 8-19 * * 1-5",
"execute": "/app/gitsyncdir $GIT_REPOSITORY $GIT_BRANCH $GIT_DIRECTORY "
}]
}
Tip: use https://crontab.guru/ to check the
when
of your tasks.
To enable autentication, just edit this line with the wanted login/password in the config:
{
"options": {
"authUser": "admin",
"authPass": "secret"
}
}
Re-route path using regex, just add rules with from/to key in the config:
{
"options" : {
"rewrite": [
{
"from": "/(.*)",
"to": "https://user-doc.lodex.inist.fr/$1"
}
]
}
}
{
"options": {
"logFormat": "combined"
}
}
To run stuff locally, just type:
make build
make run-debug
Then open your browser at http://localhost:8000