(core) fix docker packaging after core shuffle

Summary:
The docker image was not building or running correctly
after breaking out more material into core.  This corrects
the necessary paths.

Test Plan:
tested by building locally with `./contain.sh ./build docker`
and running containers in development and production mode.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2555
This commit is contained in:
Paul Fitzpatrick 2020-07-22 12:35:41 -04:00
parent a19f19b503
commit 4452a816ff

View File

@ -14,6 +14,7 @@ export const codeRoot = path.dirname(path.dirname(path.dirname(__dirname)));
* etc.
*/
export function getAppRoot(): string {
if (process.env.APP_ROOT_PATH) { return process.env.APP_ROOT_PATH; }
if (codeRoot.endsWith('/_build/core')) { return path.dirname(path.dirname(codeRoot)); }
return codeRoot.endsWith('/_build') ? path.dirname(codeRoot) : codeRoot;
}