@webqit/webflo 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/docker/Dockerfile +0 -26
- package/docker/README.md +0 -77
package/package.json
CHANGED
package/docker/Dockerfile
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Base installations
|
|
2
|
-
FROM node:12-alpine
|
|
3
|
-
RUN apk add git
|
|
4
|
-
|
|
5
|
-
# We'll install npm packages at one-level higher than
|
|
6
|
-
# actuall app root, so that we can bind-mount host system's app root
|
|
7
|
-
# without overriding the container's node_modules directory
|
|
8
|
-
WORKDIR /home/www
|
|
9
|
-
RUN npm install
|
|
10
|
-
RUN npm install @webqit/webflo -g
|
|
11
|
-
RUN npm install @webqit/playui-cli -g
|
|
12
|
-
|
|
13
|
-
# Move one-level in, for the reasons above
|
|
14
|
-
WORKDIR /home/www/app
|
|
15
|
-
ENV NODE_OPTIONS=--openssl-legacy-provider
|
|
16
|
-
|
|
17
|
-
# To auto-start app (flags optional), we would add...
|
|
18
|
-
# CMD ["webflo", "start", "--env=dev", "--watch", "--http-only"]
|
|
19
|
-
|
|
20
|
-
# To build the image locally...
|
|
21
|
-
# docker build --no-cache -t webflo ./docker
|
|
22
|
-
|
|
23
|
-
# To publish to docker hub...
|
|
24
|
-
# docker login -u webqit
|
|
25
|
-
# docker tag webflo webqit/webflo
|
|
26
|
-
# docker push webqit/webflo
|
package/docker/README.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Webflo Container
|
|
2
|
-
|
|
3
|
-
This is simply a node.js container with the `@webqit/webflo` framework installed. Once started, any webflo app can be deployed into the container from any git repository.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
This container image lives on Docker Hub and can be pulled to a local machine or a remote Virtual Machine (VM) on any cloud platform.
|
|
8
|
-
|
|
9
|
-
+ [To Use Locally](#to-use-locally)
|
|
10
|
-
+ [To Use In the Cloud](#to-use-in-the-cloud)
|
|
11
|
-
* [To Deploy An App From Any Repo](#to-deploy-an-app-from-any-repo)
|
|
12
|
-
|
|
13
|
-
### To Use Locally
|
|
14
|
-
|
|
15
|
-
Ensure you have docker installed on your computer and run the following command from any location on your terminal:
|
|
16
|
-
|
|
17
|
-
```shell
|
|
18
|
-
docker pull webqit/webflo:latest
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
The above command pulls the `webqit/webflo` image to your local machine. (But this can be automatically done by docker on running any docker commands that reference the `webqit/webflo` image.)
|
|
22
|
-
|
|
23
|
-
Next is to use the following commands to start the container and the Webflo runtime. In each case, the first part of the command starts the container, while the second part (from `webflo start`) starts the application.
|
|
24
|
-
|
|
25
|
-
#### To Start
|
|
26
|
-
|
|
27
|
-
Start the container using `docker run`; map a port (e.g `80`) of your host machine to `3000` of the container (unless changed webflo expects to run on port `3000`); optionally, give your container a name; reference `webqit/webflo` as the image to use; and lastly, start webflo using `webflo start`.
|
|
28
|
-
|
|
29
|
-
```shell
|
|
30
|
-
docker run -d -p 80:3000 --name my-app webqit/webflo webflo start
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Visit [localhost](http://localhost) to view your app.
|
|
34
|
-
|
|
35
|
-
#### To Start In Dev Mode
|
|
36
|
-
|
|
37
|
-
Webflo's *dev* mode is the perfect mode for developing locally. All you do is append the `--env=dev --watch` flags to your webflo commands. [(Learn more)](#)
|
|
38
|
-
|
|
39
|
-
```shell
|
|
40
|
-
docker run -d -p 80:3000 --name my-app webqit/webflo webflo start --env=dev --watch
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
In *dev* mode, webflo automatically restarts as you make changes to your codebase. Since webflo now lives inside a container, you'll need to *bind* the directory of your source code on your host machine to the `/home/www/app` directory of the container.
|
|
44
|
-
|
|
45
|
-
```shell
|
|
46
|
-
docker run -d -v /Users/me/my-app:/home/www/app -p 80:3000 --name my-app webqit/webflo webflo start --env=dev --watch
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### To Use In the Cloud
|
|
50
|
-
|
|
51
|
-
TODO
|
|
52
|
-
|
|
53
|
-
### To Deploy An App From Any Repo
|
|
54
|
-
|
|
55
|
-
Whether running locally or in the cloud, webflo can easily take your application from any git repo. This follows webflo's normal `deploy` command.
|
|
56
|
-
|
|
57
|
-
Simply point docker at your container (using `docker exec [container-name]`) and execute the `webflo deploy` command.
|
|
58
|
-
|
|
59
|
-
```shell
|
|
60
|
-
docker exec my-app webflo deploy https://github.com/me/my-app
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
If you will need to install any npm dependencies, you would run `npm install` on the appropriate directory in your container.
|
|
64
|
-
|
|
65
|
-
```shell
|
|
66
|
-
docker exec my-app npm install
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
If you will need to run additional webflo commands (e.g `webflo restart` to restart the application), you would follow the same pattern above.
|
|
70
|
-
|
|
71
|
-
```shell
|
|
72
|
-
docker exec my-app webflo restart
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Extending this Build
|
|
76
|
-
|
|
77
|
-
TODO
|