Skip to content

Commit f269a7d

Browse files
authored
Merge pull request #1734 from vircadia/feature/multi-server
Docker configurations for servers.
2 parents 185a3ad + 9b126cf commit f269a7d

File tree

4 files changed

+111
-0
lines changed

4 files changed

+111
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Running multiple containers
2+
3+
## _This is the instruction of how to establish seven containers to let them connect with each other using docker-compose command in a YAML file. (one domain server + six assignment clients)_
4+
5+
6+
---
7+
## _How to start the containers_
8+
9+
- clone the repo or single yaml file and jump into that directory.
10+
11+
- modify the following commands in the yaml file.
12+
13+
```
14+
domain-server:
15+
image: <image_name>
16+
17+
assignment-client:
18+
image: <image_name>
19+
20+
```
21+
22+
- run the following command in your terminal.
23+
24+
```
25+
docker-compose up -d --scale assignment-client=6
26+
```
27+
28+
- after running the above command, check all running and stopped containers by typing (or you can find the containers on docker desktop if you have).
29+
30+
```
31+
docker ps
32+
```
33+
34+
```
35+
docker ps -a
36+
```
37+
38+
---
39+
40+
## _How to check the servers in the containers are operating properly_
41+
42+
- start vircadia and type localhost in explore app.
43+
44+
- type "localhost:40100" in your web explorer.
45+
46+
- you should see seven (or six) nodes by clicking Nodes on top.
47+
48+
---
49+
50+
## _Note: the other five assigment client containers have to be started manually either through terminal or docker desktop_
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# We need 7 containers in total, one domain server
2+
# + six assignment clients
3+
# -a 172.17.0.1
4+
5+
version: "3.8"
6+
services:
7+
domain-server:
8+
image: james422481/vircadia_server:1
9+
ports:
10+
- "40100:40100/tcp"
11+
- "40102:40102/udp"
12+
command: /opt/vircadia/domain-server
13+
assignment-client:
14+
image: james422481/vircadia_server:1
15+
ports:
16+
- "40200-40205:40200/udp"
17+
extra_hosts:
18+
- "host.docker.internal:host-gateway"
19+
command: /opt/vircadia/assignment-client -a host.docker.internal -p 40200 --server-port 40102 --disable-domain-port-auto-discovery
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Building the server image
2+
3+
## _This is the instruction of how to build the image that contains the domain-server and the assignment-clients (and the ice-server) using the Dockerfile_
4+
5+
---
6+
## _How to build the image_
7+
8+
- clone the repo or the folder named "docker-image-generation" and jump into that directory.
9+
10+
- copy the .deb file into this folder and modify the following command in Dockerfile.
11+
12+
```
13+
COPY <filename.deb>
14+
```
15+
16+
- run the following command in your terminal (Ubuntu 20.04).
17+
18+
- make sure you assign a name to the image by replacing "image_name".
19+
20+
```
21+
docker build -t <image_name> .
22+
```
23+
24+
---
25+
26+
## _How to check the image is built successfully_
27+
28+
- run the following command (after starting docker desktop if you have).
29+
30+
```
31+
docker image ls
32+
```
33+
34+
- if the image is built properly, you should be able to find the image in the list.
35+
36+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ubuntu:20.04
2+
COPY vircadia-server_2022.12.02-20221123-4ff3625-0ubuntu1-1_amd64.deb .
3+
RUN apt update
4+
RUN apt install libcap2-bin -y
5+
RUN apt install systemd -y
6+
RUN apt -y install ./vircadia-server_2022.12.02-20221123-4ff3625-0ubuntu1-1_amd64.deb

0 commit comments

Comments
 (0)