https://github.com/webqit/webflo-container
Container image for webflo
https://github.com/webqit/webflo-container
Last synced: 6 months ago
JSON representation
Container image for webflo
- Host: GitHub
- URL: https://github.com/webqit/webflo-container
- Owner: webqit
- License: mit
- Created: 2021-03-28T13:44:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-02T06:58:41.000Z (almost 2 years ago)
- Last Synced: 2025-01-22T09:42:30.711Z (over 1 year ago)
- Language: Dockerfile
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webflo Container
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.
## Usage
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.
+ [To Use Locally](#to-use-locally)
+ [To Use In the Cloud](#to-use-in-the-cloud)
* [To Deploy An App From Any Repo](#to-deploy-an-app-from-any-repo)
### To Use Locally
Ensure you have docker installed on your computer and run the following command from any location on your terminal:
```shell
docker pull webqit/webflo:latest
```
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.)
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.
#### To Start
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`.
```shell
docker run -d -p 80:3000 --name my-app webqit/webflo webflo start
```
Visit [localhost](http://localhost) to view your app.
#### To Start In Dev Mode
Webflo's *dev* mode is the perfect mode for developing locally. All you do is append the `--dev` flag to your webflo commands. [(Learn more)](#)
```shell
docker run -d -p 80:3000 --name my-app webqit/webflo webflo start --dev
```
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.
```shell
docker run -d -v /Users/me/my-app:/home/www/app -p 80:3000 --name my-app webqit/webflo webflo start --dev
```
### To Use In the Cloud
TODO
### To Deploy An App From Any Repo
Whether running locally or in the cloud, webflo can easily take your application from any git repo. This follows webflo's normal `deploy` command.
Simply point docker at your container (using `docker exec [container-name]`) and execute the `webflo deploy` command.
```shell
docker exec my-app webflo deploy https://github.com/me/my-app
```
If you will need to install any npm dependencies, you would run `npm install` on the appropriate directory in your container.
```shell
docker exec my-app npm install
```
If you will need to run additional webflo commands (e.g `webflo restart` to restart the application), you would follow the same pattern above.
```shell
docker exec my-app webflo restart
```
## Extending this Build
TODO