You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: quickstart.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,8 @@ $ npm install
48
48
$ sudo npm link
49
49
```
50
50
51
+
In Windows Subsystem for Linux the `sudo npm` may not work, try `sudo -env "PATH=$PATH" npm` then. Also when using the docker related command `zendro dockerize` the `sudo -env "PATH=$PATH"` may be necessary, as docker requires to be run with higher permissions.
52
+
51
53
### Step 2: Setup a new Zendro project
52
54
53
55
The easiest way to set up Zendro is using the [Zendro CLI tool](https://github.com/Zendro-dev/zendro) with minimal steps and configuration.
@@ -82,6 +84,12 @@ Go inside the new project you just created named `<name>` and edit *NEXTAUTH_SEC
82
84
***GraphiQL in development mode:** ./graphiql-auth/.env.development
83
85
***GraphiQL in production mode:** ./graphiql-auth/.env.production
84
86
87
+
An easy way to set them in Linux is by using the following command:
88
+
89
+
```
90
+
$ sed -i 's/^\(NEXTAUTH_SECRET\)=..$/\1=.../' graphiql-auth/.env.* single-page-app/.env.*
91
+
```
92
+
85
93
If you want to know more about the enviroment variables, you can check [this]({% link env_vars.md %}).
Copy file name to clipboardExpand all lines: setup_root.md
+26-49Lines changed: 26 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,8 @@ $ npm install
50
50
$ sudo npm link
51
51
```
52
52
53
+
In Windows Subsystem for Linux the `sudo npm` may not work, try `sudo -env "PATH=$PATH" npm` then. Also when using the docker related command `zendro dockerize` the `sudo -env "PATH=$PATH"` may be necessary, as docker requires to be run with higher permissions.
54
+
53
55
### Step 2: Setup a new Zendro project
54
56
55
57
The easiest way to set up Zendro is using the [Zendro CLI tool](https://github.com/Zendro-dev/zendro). With minimal steps and configuration a Zendro warehouse taylored to your data needs can be deployed.
@@ -77,21 +79,12 @@ $ zendro new <my-project-name>
77
79
78
80
### Step 3: Edit environment variables
79
81
80
-
Go inside the new project and modify the selected enviroment variables in the following files. These files have a default configuration, please remember to add your expected secret word in the *NEXTAUTH_SECRET* variable.
82
+
Go inside the new project and modify the selected enviroment variables in the following files. These files have a default configuration, please remember to add your expected secret word in the *NEXTAUTH_SECRET* variable. An easy way to do so in Linux is by using the following command:
81
83
82
-
***Without docker setup:** You should modify this file according to your database connection. If you wish to use the default database, please replace the content of the file `./graphql-server/config/data_models_storage_config.json` for:
83
84
```
84
-
{
85
-
"default-sql": {
86
-
"storageType": "sql",
87
-
"dialect": "sqlite",
88
-
"storage": "data.db"
89
-
}
90
-
}
85
+
$ sed -i 's/^\(NEXTAUTH_SECRET\)=..$/\1=.../' graphiql-auth/.env.* single-page-app/.env.*
*Remember that dotfiles are usually treated as hidden files, so make sure you can view hidden files.*
@@ -114,6 +107,21 @@ If you want to learn more about how to define data models with Zendro, please ch
114
107
115
108
Note: by default, indices would be generated for *internalId*. And it is recommended to add indices for attributes which are foreign keys. See the [json specs]({% link setup_data_scheme.md %}#json-specs) for more information.
116
109
110
+
You should also configure the storage types you used, like credentials or port of a database.
111
+
112
+
***Without docker setup:** If you wish to use the default database, please replace the content of the file `./graphql-server/config/data_models_storage_config.json` for:
* Install [keycloak](https://www.keycloak.org). We recommend Keycloak 18+.
242
+
* Install [Keycloak](https://www.keycloak.org). Zendro works with [Keycloak 26.2.0](https://github.com/keycloak/keycloak/releases/tag/26.2.0). It is highly recommended to try the latest version and use 26.2.0 in case of breaking changes.
235
243
* Go to https://www.keycloak.org/downloads and download *Distribution powered by Quarkus*.
236
244
* After unzip, copy the keycloak configuration file from `zendro/test/env/keycloak.conf` to `keycloak/conf/keycloak.conf`.
237
245
* Two enviroment variables should be configured through command line. In terminal inside keycloak folder execute:
238
246
```
239
-
$ export KEYCLOAK_ADMIN=admin
240
-
$ export KEYCLOAK_ADMIN_PASSWORD=admin
247
+
$ export KC_BOOTSTRAP_ADMIN_USERNAME=admin
248
+
$ export KC_BOOTSTRAP_ADMIN_PASSWORD=admin
241
249
```
242
250
*Important: If you are working on Windows and the command `export` is not working, ignore this step. Keycloak is going to ask you for the admin credentials when it starts in the web interface.*
243
251
@@ -248,30 +256,6 @@ If you prefer to use local setup with Keycloak, there are a few things to do aft
248
256
249
257
250
258
* Zendro realm configuration will be done when the migration file is executed after zendro starts.
251
-
<br/><br/>
252
-
253
-
254
-
* In order to get zendro and keycloak running, you have to do some modifications in your zendro new project `.env` files. Remember that dotfiles are usually treated as hidden files, so make sure you can view hidden files.
255
-
256
-
* ./single-page-app/.env.production and ./single-page-app/.env.development
@@ -288,20 +272,13 @@ If you prefer to use local setup with Keycloak, there are a few things to do aft
288
272
* Single Page App (SPA) - http://localhost:8080
289
273
* Keycloak - http://localhost:8081/
290
274
291
-
*If you are having problems starting zendro in development mode due to "mandatory OAuth2 variables are not being set" error in SPA or GraphiQL, please run `zendro stop` to stop the services and then `zendro start` to start services again. This happens because graphql-server should write the OAuth2 variables in .env files before SPA and GraphiQL load, but SPA and GraphiQL are loading faster than graphql-server.*
275
+
*If you are having problems starting zendro in development mode due to "mandatory OAuth2 variables are not being set" error in SPA or GraphiQL, please run `zendro stop` to stop the services and then `zendro start` to start services again. This happens because graphql-server should write the OAuth2 variables in .env files before SPA and GraphiQL load, but SPA and GraphiQL may load faster than graphql-server.*
292
276
293
277
**Production mode**
294
278
295
-
*Remember that dotfiles are usually treated as hidden files, so make sure you can view hidden files.*
296
-
297
-
* Copy the content of `./graphiql-auth/.env.development` to `./graphiql-auth/.env.production`
298
-
* Copy the content of `./single-page-app/.env.development` to `./single-page-app/.env.production`
299
-
* Modify the `OAUTH2_TOKEN_URI` env var in `./graphql-server/.env`:
0 commit comments