|
| 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