Skip to content

Commit c8c8c49

Browse files
andrasbacsaiyamalight
authored andcommitted
Move server docs to main repo (#178)
Moved server docs to main repository
1 parent 0a9b8e7 commit c8c8c49

File tree

4 files changed

+126
-1
lines changed

4 files changed

+126
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ You can find a list of all commands and options in the [docs](./docs/README.md).
6666
## Docs
6767

6868
- [Basics](docs/Basics.md)
69+
- [Server Installation](docs/ServerInstallation.md)
70+
- [Server Configuration](docs/ServerConfiguration.md)
6971
- [Advanced topics](docs/Advanced.md)
7072
- [FAQ](docs/FAQ.md)
7173
- [Contribution Guideline](docs/Contributing.md)

docs/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
## Table of Contents
22

33
- [Basics](Basics.md)
4+
- [Server Installation](ServerInstallation.md)
5+
- [Server Configuration](ServerConfiguration.md)
46
- [Advanced topics](Advanced.md)
57
- [FAQ](FAQ.md)
8+
- [Contribution Guideline](Contributing.md)
69
- [Templates guide](TemplatesGuide.md)
10+
- [Recipes guide](RecipesGuide.md)
711
- [Using nightly versions](Nightly.md)
8-
- [Articles, video and related links](Links.md)
12+
- [Tutorials, articles, video and related links](Links.md)
913
- [Change Log](../CHANGELOG.md)

docs/ServerConfiguration.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
## Server Configuration
3+
4+
Exoframe stores its config in `~/.exoframe/server.config.yml`.
5+
Currently it contains the following settings:
6+
7+
```yaml
8+
# whether debug mode is enabled, default "false"
9+
debug: false
10+
11+
# whether to enable letsencrypt, default "false"
12+
letsencrypt: false
13+
14+
# email used for letsencrypt
15+
letsencryptEmail: [email protected]
16+
17+
# whether to apply gzip compression, default "true"
18+
compress: true
19+
20+
# base top-level domain to use for deployments without domains specified, default "false"
21+
# used as postfix, e.g. if you specify ".example.com" (dot is auto-prepended if not present)
22+
# all your deployments will be autodeployed as "deployment-id.example.com"
23+
baseDomain: false
24+
25+
# CORS support; can be "true" ("*" header) or object with "origin" property, default "false"
26+
cors: false
27+
28+
# Traefik image to be used; set to "false" to disable traefik management, default "traefik:latest"
29+
traefikImage: 'traefik:latest'
30+
31+
# Traefik container name, default "exoframe-traefik"
32+
traefikName: 'exoframe-traefik'
33+
34+
# Additional Traefik start args, default []
35+
traefikArgs: []
36+
37+
# Network used by traefik to connect services to, default "exoframe"
38+
exoframeNetwork: 'exoframe'
39+
40+
# server image update channel; can be "stable" or "nightly", default "stable"
41+
updateChannel: 'stable'
42+
43+
# path to folder with authorized_keys, default "~/.ssh"
44+
publicKeysPath: '/path/to/your/public/keys'
45+
46+
# whether Exoframe server whould be running in swarm mode, default "false"
47+
swarm: false
48+
```
49+
50+
_Warning:_ Most changes to config are applied immediately. With exception of Letsencrypt config. If you are enabling letsencrypt after Traefik instance has been started, you'll need to remove Traefik and then restart Exoframe server for changes to take effect.

docs/ServerInstallation.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Exoframe Server
2+
3+
## Installation and Usage
4+
5+
1. Make sure you have Docker [installed and running](https://docs.docker.com/engine/installation/) on your host.
6+
2. Pull and run Exoframe server using docker:
7+
8+
```sh
9+
docker run -d \
10+
-v /var/run/docker.sock:/var/run/docker.sock \
11+
-v /path/to/exoframe-folder:/root/.exoframe \
12+
-v /home/user/.ssh/authorized_keys:/root/.ssh/authorized_keys:ro \
13+
-e EXO_PRIVATE_KEY=your_private_key \
14+
--label traefik.backend=exoframe-server \
15+
--label traefik.frontend.rule=Host:exoframe.your-host.com \
16+
--restart always \
17+
--name exoframe-server \
18+
exoframe/server
19+
20+
# Explanation for arguments:
21+
# this allows Exoframe to access your docker
22+
-v /var/run/docker.sock:/var/run/docker.sock
23+
24+
# /path/to/exoframe-folder should be path on your server
25+
# to desired folder that'll hold Exoframe configs
26+
-v /path/to/exoframe-folder:/root/.exoframe
27+
28+
# /home/user/.ssh/authorized_keys should point to your authorized_keys file
29+
# for SSH that holds allowed public keys
30+
-v /home/user/.ssh/authorized_keys:/root/.ssh/authorized_keys:ro
31+
32+
# this is your private key used for JWT encryption
33+
-e EXO_PRIVATE_KEY=your_jwt_encryption_key
34+
35+
# this is used to tell traefik to which deployment current docker service belongs
36+
--label traefik.backend=exoframe-server
37+
38+
# this is used to tell traefik on which domain should Exoframe server be listening
39+
--label traefik.frontend.rule=Host:exoframe.your-host.com
40+
```
41+
42+
3. Edit config file to fit your needs (see section below)
43+
44+
Then install [Exoframe CLI](https://github.com/exoframejs/exoframe), point it to your new Exoframe server and use it.
45+
46+
## Installation and usage in Swarm mode
47+
48+
Exoframe also supports running in [Swarm mode](https://docs.docker.com/engine/swarm/).
49+
To run Exoframe server in swarm, you need to do the following:
50+
51+
1. Make sure you have Docker on your host.
52+
2. Make sure your Docker has [Swarm mode enabled](https://docs.docker.com/engine/swarm/swarm-tutorial/create-swarm/).
53+
3. Pull and run Exoframe server using Docker on your manager node:
54+
55+
```
56+
docker service create \
57+
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
58+
--mount type=bind,source=/path/to/exoframe-folder,target=/root/.exoframe \
59+
--mount type=bind,source=/home/user/.ssh/authorized_keys,target=/root/.ssh/authorized_keys,readonly \
60+
-e EXO_PRIVATE_KEY=your_private_key \
61+
--label traefik.backend=exoframe-server \
62+
--label traefik.frontend.rule=Host:exoframe.your-host.com \
63+
--label traefik.port=8080 \
64+
--constraint=node.role==manager \
65+
--name exoframe-server \
66+
exoframe/server
67+
```
68+
69+
Note that both Exoframe server and Traefik will be run on your manager node.

0 commit comments

Comments
 (0)