Installation
Using Docker
WARNING
This requires you to install Docker, the world’s leading software container platform.
We provide Docker images on the Docker Hub to ease deploying your own instance. To run correctly it has to be linked with a standard MongoDB container for the database. Although it's possible to directly run Docker commands we provide you with docker-compose file to ease deployment. This file is detailed in the following sections and is available in the public folder of the documentation.
Jump into the folder with the docker-compose file, the following commands should do the job:
// Retrieve the latest available dev tag
docker pull kalisio/skeleton:dev
// Run the MongoDB and skeleton containers
docker-compose up -d
// Stop the MongoDB and skeleton containers
docker-compose down
// Stop the MongoDB and skeleton containers erasing DB data
docker-compose down -v
Then point your browser to localhost:8080.
TIP
Check the default.cjs configuration file to find the required login information
WARNING
If running Docker under Windows in a virtual machine first redirect the port 8080 of your virtual machine to your host
docker-compose.yml - Used to deploy MongoDB and skeleton containers.
version: '3.3'
services:
skeleton:
image: kalisio/kapp:dev
environment:
- DB_URL=mongodb://mongodb:27017/kapp
ports:
- "8080:8081"
networks:
- skeleton
mongodb:
image: mongo:4.2
volumes:
- mongodb:/data/db
ports:
- "27017:27017"
networks:
- skeleton
volumes:
mongodb:
networks:
skeleton:
TIP
For most applications some secrets (like your AWS S3 access key) need also to be set in your environment to make it work, see deployment prerequisites
From source code
While it is a WIP and not yet pushed to NPM, or when developing, please use the following process.
TIP
We recommand using our CLI but you can still proceed manually as explained below.
First you have to ensure the KDK prerequisites to run kApp from source code. Then the following commands, assuming you have a MongoDB instance running on local host and default port (27017), should launch your local instance of kApp.
Start by cloning all the modules you need and use yarn/npm link to make them globally available to your Node.js installation:
// Clone and link KDK
git clone https://github.com/kalisio/kdk.git
cd kdk
yarn install
yarn link
...
Then clone the main app repository and link to modules to make Node.js pointing to the previously cloned modules instead of those installed by yarn/npm, e.g. :
// In another terminal clone and link modules to skeleton
git clone https://github.com/kalisio/skeleton.git
// Run the server/API
cd skeleton/api
yarn install
yarn link @kalisio/kdk
yarn dev
// In another terminal run the client app
cd skeleton
yarn install
yarn link @kalisio/kdk
yarn dev
Then point your browser to localhost:8080.
WARNING
Take care that if a top-level module/plugin might depend on another module/plugin you will have to link them together during development, for instance the kdk module depends on the weacast-core module.