Prerequisites
- Any Linux Distro
- Docker & Docker-Compose installed
- Node
cd ~
git clone https://gitlab.vayu-software.de/fde/fde.git
cd fdedocker network create proxy-network2. You need .npmrc with your token from here
- If there is no .npmrc on for host you should create it first in your home directory.
/home/your_username/.npmrc- Copy the content below and replace
<your_token_here>with the actual value of your token.
//gitlab.vayu-software.de/api/v4/projects/89/packages/npm/:_authToken=<your_token_here>
//gitlab.vayu-software.de/api/v4/packages/npm/:_authToken=<your_token_here>
@vayu-fde:registry=https://gitlab.vayu-software.de/api/v4/projects/89/packages/npm
This is required for installing our private npm packages. Otherwise the setup will fail
./setup.shnpm run dev:startIt will be now your project folder. It will help you to see only changes related to whole project.
If all docker containers have started properly, you should see the project is working at http://creator.localhost:1337 (the port will be random).
(You might need to forward the port 80. Here you can see how: https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_54.md)
Later you can shut down all docker containers with the following command:
npm run dev:stopYou can place the code in the following folders:
-
./apps/creator/pages- only files containing next pages and ajax request handlers should be placed here -
./apps/creator/components- all react components that you want to create specifically for this project and all the files related to them should be placed here. Components, that could be used somewhere else, i.e. in a client application, should be transformed to or included in a separate npm package. -
./apps/creator/lib- here should be placed the code that could be used everywhere throughout the project -
./apps/creator/styles- common styling files should be placed here (mostly*.scssand*.module.scssfiles) -
./apps/creator/public- images, icons, manifest files and other files that should be used as is by the built project should be placed here.
Attention! Please, do not create any other folders directly inside
creatorfolder. Use instead one of folders mentioned above.
When first setting up the project with ./setup.sh, keycloak imports a aready existing realm located in ./docker/config/keycloak/realms/import/keyclok-backup.json. The reason this realm exists is so you don't have to setup everything manually.
If you want to get to the initial state of this realm or you want to import new realm:
-
First you need to place the realm file with file name
keycloak-backup.jsonin./docker/config/keycloak/realms/import/ -
After placing the realm into the correct directory, make sure that keycloak is running, and run this command
npm run keycloak:import
If you want to export a realm(also can be used for backup):
-
First you need make sure that keycloak is running
-
The exported realm will be located in
./docker/config/realms/export/keycloak-backup.jsonby running
Any previous realm might get overwritten when using this command
npm run keycloak:export
To store your git credentials and not retype them on every git push or pull you can use this command
git config --global credential.helper 'store'It's likely because of standard apache server has taken it. To stop it and disable from launching in the future, run the following commands:
sudo service apache2 stop
sudo service apache2 disableWhen opening http://creator.localhost:1337 I see error 502
Just wait a little bit. It takes time to start up the nodejs server of fde-creator project. If it took more then 1 minute, then check the logs of nodejs docker container.