-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
### Building and Running Webapps | ||
|
||
It is possible to build and run webapps using the `build-webapp` and `run-webapp` subcommand. | ||
|
||
To make it easier to build once, and deploy to with varying configuration, compilation and static | ||
page generation are separated in the `build-webapp` and `run-webapp` steps, and the use of the | ||
environment variables via `process.env` is detected at compile-time and placeholder substituted | ||
which will be filled in at runtime. | ||
|
||
This offers much more flexibilty in configuration and deployment than standard build methods. | ||
|
||
## Build | ||
|
||
``` | ||
$ cd ~/cerc | ||
$ git clone [email protected]:cerc-io/test-progressive-web-app.git | ||
$ laconic-so build-webapp --source-repo ~/cerc/test-progressive-web-app | ||
... | ||
Successfully tagged cerc/test-progressive-web-app:local | ||
################################################################# | ||
Built host container for ~/cerc/test-progressive-web-app with tag: | ||
cerc/test-progressive-web-app:local | ||
To test locally run: | ||
laconic-so run-webapp --image cerc/test-progressive-web-app:local --env-file /path/to/environment.env | ||
``` | ||
|
||
## Run | ||
|
||
``` | ||
$ laconic-so run-webapp --image cerc/test-progressive-web-app:local --env-file ~/tmp/env.igloo | ||
Image: cerc/test-progressive-web-app:local | ||
ID: 4c6e893bf436b3e91a2b92ce37e30e499685131705700bd92a90d2eb14eefd05 | ||
URL: http://localhost:32768 | ||
``` |