Ind.ie is now Small Technology Foundation.
README.md 3.36 KB
Newer Older
Aral Balkan's avatar
Aral Balkan committed
1
# Indie Site
Aral Balkan's avatar
Aral Balkan committed
2

Aral Balkan's avatar
Aral Balkan committed
3
> Federated Personal Web Site
Aral Balkan's avatar
Aral Balkan committed
4 5 6

## About

Aral Balkan's avatar
Aral Balkan committed
7
This is a very early exploration of a federated personal web site.
Aral Balkan's avatar
Aral Balkan committed
8

Aral Balkan's avatar
Aral Balkan committed
9 10 11
For more information, please see the [Indienet project planning documentation at indienet.info](https://indienet.info).

## Development
Aral Balkan's avatar
Aral Balkan committed
12

Aral Balkan's avatar
Aral Balkan committed
13 14
1. `npm install`
2. `npm run dev`
Aral Balkan's avatar
Aral Balkan committed
15

16 17 18
By default, your local instance will run on localhost port 5000.

To specify a different port (e.g., to run two separate instances when testing federation), use:
19 20 21 22 23

`npm run dev -- --port 7999`

## Production

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Not ready for production use. See deployment and deployment server setup instructions, below, for testing deployment during development.

## Deployment server setup

For testing deployment, we currently use [Dokku](http://dokku.viewdocs.io/dokku/) on an OpenStack-based VPS at [CloudScale](https://cloudscale.ch) running Ubuntu 16.04. This will remain the supported method for people with technical knowledge to install Indie Site.

1. Install [Dokku](http://dokku.viewdocs.io/dokku/) on your own server running Ubuntu 16.04 and set up your DNS with A (and AAAA for IPv6) records pointing to your domain for _your.domain_ and _www.your.domain_.

2. Create the app on your server (at the domain root):
    ```bash
    dokku apps:create your.domain
    ```

3. Set up persistent storage:
    ```bash
    sudo mkdir -p /var/lib/dokku/data/storage/indie
40
    sudo chown 32767:32767 /var/lib/dokku/data/storage/indie
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
    dokku storage:mount /var/lib/dokku/data/storage/indie:/app/.indie
    ```

    This will set up a folder to mirror the `/app/.indie` directory that Indie Site expects for storing persistent files in and looks for via `path.join(os.homedir(), '.indie')`.

3. Clone this repository and set up a deployment Git remote endpoint on _your local working copy_:

    ```bash
    git remote add deploy dokku@your.domain:your.domain
    ```

4. Push to deploy:

    ```bash
    git push deploy master
    ```

5. Set up TLS via the [Dokku Let’s Encrypt plugin](https://github.com/dokku/dokku-letsencrypt):

    ```bash
    sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
    dokku config:set --no-restart your.domain DOKKU_LETSENCRYPT_EMAIL=your@email.tld
    dokku letsencrypt your.domain
    ```
65

66
That’s it! You should be up and running with your own instance of Indie Site.
67

Aral Balkan's avatar
Aral Balkan committed
68
## Configuration
Aral Balkan's avatar
Aral Balkan committed
69

Aral Balkan's avatar
Aral Balkan committed
70
The site configuration is currently in the _assets/_ directory. This will change shortly to a location that can be easily included during deployment and one that isn’t checked into source control.
Aral Balkan's avatar
Aral Balkan committed
71

Aral Balkan's avatar
Aral Balkan committed
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
The _data.json_ file in _assets/data.json_ currently contains data 
pertaining to the owner of the site:

  * Domain
  * Name
  * Bio
  * Encrypted private key
  * Public key

In the _assets/_ folder, there are also two image files:

  * Profile image (profile-image.png)
  * Background image (background-image.jpg)

These are currently treated as well-known locations, but they will later be served from the /profile-image and /background-image routes that abstract away the image types, etc., and can truly function as well-known locations and part of the site’s API.
Aral Balkan's avatar
Aral Balkan committed
87 88 89

## Testing

Aral Balkan's avatar
Aral Balkan committed
90 91 92
Run `npm run test` and all tests in the `test/` directory will be run.

## Dependencies
Aral Balkan's avatar
Aral Balkan committed
93

Aral Balkan's avatar
Aral Balkan committed
94
The only dependency is Node.js and node packages. Everything runs as a single process, including the database.
Aral Balkan's avatar
Aral Balkan committed
95 96 97

## Changelog

Aral Balkan's avatar
Aral Balkan committed
98
__1.0.0__
Aral Balkan's avatar
Aral Balkan committed
99

Aral Balkan's avatar
Aral Balkan committed
100
- In development.
Aral Balkan's avatar
Aral Balkan committed
101 102 103

## License

Aral Balkan's avatar
Aral Balkan committed
104
Copyright (c) 2018 Ind.ie.
Aral Balkan's avatar
Aral Balkan committed
105

Aral Balkan's avatar
Aral Balkan committed
106
Licensed under the [AGPL](LICENSE).