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: server/README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ From version 2.0 omSupply would require both legacy and omSupply central server
110
110
-`cargo run` twice but change port, database and sync settings in yaml file or overwrite with env variables
111
111
112
112
For example, two sites running locally from the same repo, __central__ and __test__, for __central__ site `Site is open mSupply central server` is checked and `This site url` is http://localhost:2055.
113
-
Comment out all sync settings in yaml and can start __central__ with `APP_SERVER__PORT=2055 APP_DATABASE__DATABASE_NAME="central_test" cargo run` front end would be started with `yarn start -- -- --env API_HOST='http://localhost:2055' --port 3005` (--port is for webpack port), and then start __test__ with `cargo run` and `yarn && yarn start-local` from respective folders. The first site would be initialised with `central` site credentials first, and second sites with __test__ credentials, __test__ site would sync with both legacy mSupply and omSupply central server (this __central__ site), and __central__ site would synchronise with legacy mSupply server only
113
+
Comment out all sync settings in yaml and can start __central__ with `APP__SERVER__PORT=2055 APP__DATABASE__DATABASE_NAME="central_test" cargo run` front end would be started with `yarn start -- -- --env API_HOST='http://localhost:2055' --port 3005` (--port is for webpack port), and then start __test__ with `cargo run` and `yarn && yarn start-local` from respective folders. The first site would be initialised with `central` site credentials first, and second sites with __test__ credentials, __test__ site would sync with both legacy mSupply and omSupply central server (this __central__ site), and __central__ site would synchronise with legacy mSupply server only
114
114
115
115
116
116
### Start server in watch mode
@@ -211,13 +211,13 @@ If you want to ensure all your changes have been written to the main sqlite data
211
211
212
212
`note`: yaml configurations are likely to be deprecated to .env, thus documentations is limited for .yaml.
213
213
214
-
In `configurations` folder you'll find `.yaml` config files, there is `base`, `local` (will overwrite/expand `base` in dev mode), `production` (will overwrite/expand other configs when `APP_ENVIRONMENT=production ).
214
+
In `configurations` folder you'll find `.yaml` config files, there is `base`, `local` (will overwrite/expand `base` in dev mode), `production` (will overwrite/expand other configs when `APP__ENVIRONMENT=production ).
215
215
216
-
You can use env variable to overwrite any configurations, can use dot notation with `__` (two underscore) to specify nested value. Env vars configuration overrides start with `APP_`.
216
+
You can use env variable to overwrite any configurations, can use dot notation with `__` (two underscore) to specify nested value. Env vars configuration overrides start with `APP__`.
Copy file name to clipboardexpand all lines: server/service/src/sync/test/integration/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,14 @@ Only data that needs to be present on central server site is a new sync site (th
45
45
## 4 `Open mSupply central server`
46
46
47
47
- Another instance of omSupply should be running as central server, in order to set omSupply instance as central server, you will need to check "Site is open mSupply central server" against the site and enter correct This site url agains the site in mSupply->Special->Synchronisation->{Site}
48
-
- And graphql API should be 'open' (without token), thus 'APP_SERVER\_\_DEBUG_NO_ACCESS_CONTROL' env variable should be set to `true`
48
+
- And graphql API should be 'open' (without token), thus 'APP__SERVER\_\_DEBUG_NO_ACCESS_CONTROL' env variable should be set to `true`
49
49
50
50
In case you are wondering, the APP env variables translate to settings in [configuration .yaml](https://github.com/msupply-foundation/open-msupply/blob/1b8b9237863eef1a764be3973d563e6d84358827/server/configuration/example.yaml#L7) files, and override them
51
51
52
52
Here is the full command line I used, for this setting "test" site `Site is open mSupply central server` is ticked and `This site url` is set to "http://localhost:2055"
53
53
54
54
```bash
55
-
APP_SERVER__PORT=2055 APP_DATABASE__DATABASE_NAME="central_test"APP_SYNC__URL="http://localhost:2048"APP_SYNC__INTERVAL_SECONDS=30 APP_SERVER__DEBUG_NO_ACCESS_CONTROL=TRUE APP_SYNC__PASSWORD_SHA256="d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1"APP_SYNC__USERNAME="test" cargo run
55
+
APP__SERVER__PORT=2055 APP__DATABASE__DATABASE_NAME="central_test"APP__SYNC__URL="http://localhost:2048"APP__SYNC__INTERVAL_SECONDS=30 APP__SERVER__DEBUG_NO_ACCESS_CONTROL=TRUE APP__SYNC__PASSWORD_SHA256="d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1"APP__SYNC__USERNAME="test" cargo run
56
56
```
57
57
58
58
In this case d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1 = pass
0 commit comments