indie-site-deployment.en.md 1.91 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
title: "Indie Site Deployment"
weight: 20
---

When called with a valid and authenticated [POST request to the Site Service](../api/#site-service), the Magic Website Factory:

  1. Registers the requested domain.
  2. Configures an [Indie Site](/site) instance with the passed owner settings details.
  3. When ready, calls the passed callback URL to inform Hallo.gent.

[The relevant API call](../api/#site-service) is detailed on the API page.

Here, we present the requirements for Indie Site configuration.

## Application details

[Indie Site](/site) ([source](https://source.ind.ie/indienet/site)):

  * Is a pure Node.js application
  * Is single process (uses an in-process LevelDB database)
  * Only has node module dependencies (`npm install`)

## Configuration

26
Indie Site expects its configuration data to be accessible from the following directory, which must be set up by the Magic Website Factory:
27

28
29
30
```bash
~/indie
```
31
32
33

Inside that directory, it expects the following file:

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
```bash
~/indie/owner-settings.json
```

The `owner-settings.json` file contains the owner settings that were passed to the [Magic Website Factory Site Service (POST) method](../api/#site-service)

The owner settings object that is passed only contains the `<secret sign-up code>`, so the _~/indie/owner-settings.json_ in a configured Indie Site instance should match the following:

```json
{
  "secretSignupCode": "<secret-sign-up-code>"
}
```

Indie Site uses the `secretSignupCode` to authenticate the initial configuration call from Hallo.gent. Unless the secret sign-up code passed matches the one in _~/indie/owner-settings.json_, attempts to configure the new site are refused. This is to prevent an edge-case where a malicious actor might gain access and ownership of newly-created Indie Sites before the legitimate owner has had a chance to set up their password and claim ownership.
49
50
51
52
53
54
55
56

## Running

To run Indie Site in production:

```bash
npm start
```