|
10 | 10 |
|
11 | 11 | Exoframe is a self-hosted tool that allows simple one-command deployments using Docker. |
12 | 12 |
|
13 | | -## Installation and Usage |
| 13 | +## Installation, usage and docs |
14 | 14 |
|
15 | | -1. Make sure you have Docker [installed and running](https://docs.docker.com/engine/installation/) on your host. |
16 | | -2. Pull and run Exoframe server using docker: |
17 | | - |
18 | | -```sh |
19 | | -docker run -d \ |
20 | | - -v /var/run/docker.sock:/var/run/docker.sock \ |
21 | | - -v /path/to/exoframe-folder:/root/.exoframe \ |
22 | | - -v /home/user/.ssh/authorized_keys:/root/.ssh/authorized_keys:ro \ |
23 | | - -e EXO_PRIVATE_KEY=your_private_key \ |
24 | | - --label traefik.backend=exoframe-server \ |
25 | | - --label traefik.frontend.rule=Host:exoframe.your-host.com \ |
26 | | - --restart always \ |
27 | | - --name exoframe-server \ |
28 | | - exoframe/server |
29 | | - |
30 | | -# Explanation for arguments: |
31 | | -# this allows Exoframe to access your docker |
32 | | --v /var/run/docker.sock:/var/run/docker.sock |
33 | | - |
34 | | -# /path/to/exoframe-folder should be path on your server |
35 | | -# to desired folder that'll hold Exoframe configs |
36 | | --v /path/to/exoframe-folder:/root/.exoframe |
37 | | - |
38 | | -# /home/user/.ssh/authorized_keys should point to your authorized_keys file |
39 | | -# for SSH that holds allowed public keys |
40 | | --v /home/user/.ssh/authorized_keys:/root/.ssh/authorized_keys:ro |
41 | | - |
42 | | -# this is your private key used for JWT encryption |
43 | | --e EXO_PRIVATE_KEY=your_jwt_encryption_key |
44 | | - |
45 | | -# this is used to tell traefik to which deployment current docker service belongs |
46 | | ---label traefik.backend=exoframe-server |
47 | | - |
48 | | -# this is used to tell traefik on which domain should Exoframe server be listening |
49 | | ---label traefik.frontend.rule=Host:exoframe.your-host.com |
50 | | -``` |
51 | | - |
52 | | -3. Edit config file to fit your needs (see section below) |
53 | | - |
54 | | -Then install [Exoframe CLI](https://github.com/exoframejs/exoframe), point it to your new Exoframe server and use it. |
55 | | - |
56 | | -## Installation and usage in Swarm mode |
57 | | - |
58 | | -Exoframe also supports running in [Swarm mode](https://docs.docker.com/engine/swarm/). |
59 | | -To run Exoframe server in swarm, you need to do the following: |
60 | | - |
61 | | -1. Make sure you have Docker on your host. |
62 | | -2. Make sure your Docker has [Swarm mode enabled](https://docs.docker.com/engine/swarm/swarm-tutorial/create-swarm/). |
63 | | -3. Pull and run Exoframe server using Docker on your manager node: |
64 | | - |
65 | | -``` |
66 | | -docker service create \ |
67 | | - --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \ |
68 | | - --mount type=bind,source=/path/to/exoframe-folder,target=/root/.exoframe \ |
69 | | - --mount type=bind,source=/home/user/.ssh/authorized_keys,target=/root/.ssh/authorized_keys,readonly \ |
70 | | - -e EXO_PRIVATE_KEY=your_private_key \ |
71 | | - --label traefik.backend=exoframe-server \ |
72 | | - --label traefik.frontend.rule=Host:exoframe.your-host.com \ |
73 | | - --label traefik.port=8080 \ |
74 | | - --constraint=node.role==manager \ |
75 | | - --name exoframe-server \ |
76 | | - exoframe/server |
77 | | -``` |
78 | | - |
79 | | -Note that both Exoframe server and Traefik will be run on your manager node. |
80 | | - |
81 | | -## Configuration |
82 | | - |
83 | | -Exoframe stores its config in `~/.exoframe/server.config.yml`. |
84 | | -Currently it contains the following settings: |
85 | | - |
86 | | -```yaml |
87 | | -# whether debug mode is enabled, default "false" |
88 | | -debug: false |
89 | | - |
90 | | -# whether to enable letsencrypt, default "false" |
91 | | -letsencrypt: false |
92 | | - |
93 | | -# email used for letsencrypt |
94 | | -letsencryptEmail: [email protected] |
95 | | - |
96 | | -# whether to apply gzip compression, default "true" |
97 | | -compress: true |
98 | | - |
99 | | -# base top-level domain to use for deployments without domains specified, default "false" |
100 | | -# used as postfix, e.g. if you specify ".example.com" (dot is auto-prepended if not present) |
101 | | -# all your deployments will be autodeployed as "deployment-id.example.com" |
102 | | -baseDomain: false |
103 | | - |
104 | | -# CORS support; can be "true" ("*" header) or object with "origin" property, default "false" |
105 | | -cors: false |
106 | | - |
107 | | -# Traefik image to be used; set to "false" to disable traefik management, default "traefik:latest" |
108 | | -traefikImage: 'traefik:latest' |
109 | | - |
110 | | -# Traefik container name, default "exoframe-traefik" |
111 | | -traefikName: 'exoframe-traefik' |
112 | | - |
113 | | -# Additional Traefik start args, default [] |
114 | | -traefikArgs: [] |
115 | | - |
116 | | -# Network used by traefik to connect services to, default "exoframe" |
117 | | -exoframeNetwork: 'exoframe' |
118 | | - |
119 | | -# server image update channel; can be "stable" or "nightly", default "stable" |
120 | | -updateChannel: 'stable' |
121 | | - |
122 | | -# path to folder with authorized_keys, default "~/.ssh" |
123 | | -publicKeysPath: '/path/to/your/public/keys' |
124 | | - |
125 | | -# whether Exoframe server whould be running in swarm mode, default "false" |
126 | | -swarm: false |
127 | | -``` |
128 | | -
|
129 | | -_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. |
130 | | -
|
131 | | -## Docs |
132 | | -
|
133 | | -[Read more about Exoframe and how it works in the main repo](https://github.com/exoframejs/exoframe). |
| 15 | +For more details on how to get it up and running please follow the following link [how to setup exoframe-server](https://github.com/exoframejs/exoframe/tree/master/docs). |
134 | 16 |
|
135 | 17 | ## License |
136 | 18 |
|
|
0 commit comments