Installation

Installation

At the time of writing (2019-03-20), there’s no “packaged” form of Koype. You’ll have to spin up stuff by hand. Koype aims to follows the 12 Factor methodology to software development. Check the Environment Variables page for information about what you can tune.

Koype is a Phoenix-based application that aims to allow individuals to own their identity online. Or something like that, I’m still working on it.

Requirements

  • Elixir 1.7.1 - primary language and virtual machine
  • SQLite 3.24.0 - lightweight, portable database
  • Redis 5.0.0 - cache
  • Minio - object storage

Koype also uses Selenium for automated testing in destructible web browser containers. Koype uses SQLite as its long-term database and Mnesia for caching; effectively making Koype relatively self-contained. NodeJS is only required for building the JavaScript served in Web browsers; it’s not needed in production.

Commands

If you’re aiming to have a full developer version of Koype, you can use the provided script that makes use of Docker Compose to spin up the environment.

git clone https://git.jacky.wtf/indieweb/koype.git
scripts/dev-setup.sh

Using Docker Compose

Before getting into Docker Compose, you’ll need to create the environment variable file .env to prime your system for use. See .env.example for sane defaults. Remember to change the secret keys and salt when moving to a new environment!

Being that Koype is currently tailored to run in Docker containers, the ideal tool for local development is Docker Compose. Check out its documentation for instructions on how to install and configure it on your system.

Once you’ve got Docker Compose installed and the Docker service started, run the development startup script which will provision the containers, build the software, and start all the services.

Looking for a one-liner / copy-paste friendly?

$ cp .env.example .env
$ scripts/dev-setup.sh
# Run the following if you want to see the Slate API documentation.
$ scripts/build-documentation.sh

Now step away from the computer for a moment, stretch, and get some coffee ☕. Otherwise, you can watch its progress with the command docker-compose logs -f.

When complete, go to localhost:5000 in your web browser to begin the Koype setup process.

Without Docker

If you don’t like using Docker or cannot use it in your environment, follow these instructions for setting up each subsystem separately on the host system.

  1. Install Elixir 1.6 with Erlang/OTP
  2. Install SQLite
  3. Install NPM and Node.js 8 or 9
  4. Install Minio
  5. Run the following commands to build the software
$ mc mb koype/koype-dev --region local
$ mix do deps.get, deps.compile, compile
$ npm install --link false
$ mix ecto.setup
  1. Start Koype by running mix start