Skip to content

Commit 39ecd65

Browse files
authored
Update container instructions
1 parent 13541e0 commit 39ecd65

File tree

1 file changed

+86
-35
lines changed

1 file changed

+86
-35
lines changed
Lines changed: 86 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,121 @@
11

22
# Container Quick-Start
3+
Please use this guide if you have never used containers before.
4+
If you are familiar with container infrastructure then you may wish to simply view the [sample compose file](https://github.com/FreeTAKTeam/FreeTAKHub-Installation/blob/main/containers/example-compose.yaml) that we provide.
5+
36

47
## Runtimes
5-
Compatible with Podman or docker runtimes.
8+
A runtime is what runs the container or containers you install.
9+
10+
There are two main runtimes: Podman and Docker.
11+
12+
Docker is the original runtime and is widely supported but has some issues with security, such as running containers by default in a root-ful way.
13+
14+
Podman is a newer runtime that is shipped by default on RHEL/Fedora/CentOS systems. Containers in this runtime are by default run root-less, preventing many security issues.
15+
16+
Our containers are made and tested to be compatible with Podman, which is the more restrictive runtime. As a result these containers should function on either choice. The most important part is to choose a runtime and use the correct invocations for it.
17+
18+
If you are on RHEL/Fedora/CentOS and similar family of systems, then you can likely invoke podman without additional installation.
19+
20+
If your system does not already have a runtime, install it with your package manager.
21+
22+
Check which one you have installed by running
23+
```shell
24+
podman --version
25+
docker --version
26+
```
27+
If you have both, CHOOSE ONE and STICK WITH IT for the duration of the guide.
628

729
## Host expectations
8-
FreeTAKServer is **server** software, and should be treated as such. Installation onto a desktop environment will require
9-
additional configuration that is usually only helpful if you want to do development.
30+
The host is the computer/server/VM inside of which your runtime actually runs.
1031

11-
The use of Linux is highly encouraged, as this is the industry standard host OS for containers.
32+
FreeTAKServer is, as the name suggests, **server software**, and should be treated as such. Installation onto a normal desktop environment requires additional effort and configuration that is typically useful only for development purposes.
1233

13-
**YOU CANNOT USE DOCKER DESKTOP ON YOUR WINDOWS PC.** Docker Desktop does not provide the ability to use bind-mounted
14-
volumes, which are required in this iteration to allow the server operator to easily change the configuration files.
34+
The use of Linux is highly encouraged. This is the industry standard host OS for containers.
1535

36+
**WE WILL NOT SUPPORT RUNNING CONTAINERS ON DOCKER DESKTOP ON YOUR WINDOWS PC.**
1637

38+
Your Windows computer is not a good choice for hosting a server of any kind.
1739

1840
## Container Repository
41+
A container repository is a location where you can obtain pre-built containers.
42+
43+
Some examples are docker.io and ghcr.io.
1944

2045
Please find all of our container images on [the GitHub Container Repository.](https://github.com/orgs/FreeTAKTeam/packages)
2146

22-
You can obtain the latest images of the server and web UI by running the following commands.
23-
Please note the use of GHCR instead of dockerhub, and adjust accordingly.
47+
You can obtain the latest images of the server and web UI by running the following commands:
48+
```shell
49+
podman pull ghcr.io/freetakteam/freetakserver:latest
50+
podman pull ghcr.io/freetakteam/ui:latest
51+
52+
OR
53+
54+
docker pull ghcr.io/freetakteam/freetakserver:latest
55+
docker pull ghcr.io/freetakteam/ui:latest
56+
```
57+
58+
Please note that we use GHCR instead of the more common dockerhub.
2459

2560
## Setup
2661
### Installation Directory
27-
A directory in which to store configuration and database files is required. Please ensure the permissions for this directory
28-
allow container runtimes full `RWX` access recursively, and if using a selinux enabled OS, ensure the context is set for containers.
29-
For more information on this process, visit your OS provided documentation.
62+
Create a new directory in your home folder for this guide.
63+
```shell
64+
mkdir container
65+
cd container
66+
```
3067

3168
### Compose
69+
A compose file is a way to automate the operation of one or many containers. In this case we have a [sample compose file](https://github.com/FreeTAKTeam/FreeTAKHub-Installation/blob/main/containers/example-compose.yaml) file with just the server and UI.
3270

33-
A [sample compose file](https://github.com/FreeTAKTeam/FreeTAKHub-Installation/blob/main/containers/example-compose.yaml)
34-
is provided to speed up your setup. If you do not have any other compose files, then this can be placed in the same directory
35-
created earlier, and renamed to `compose.yaml`. Ensure that if you do not place the compose file in the same directory that
36-
you update the volume path to the correct directory.
71+
Download this file to your working directory.
72+
```shell
73+
wget https://raw.githubusercontent.com/FreeTAKTeam/FreeTAKHub-Installation/refs/heads/main/containers/example-compose.yaml -o compose.yaml
74+
```
3775

38-
If you expect to run these images as part of a larger file, then you can use the sample compose file as
39-
sensible defaults and append to your pre-existing compose file.
76+
Open this file in the text editor of your choice
77+
```shell
78+
nano compose.yaml
79+
```
4080

41-
Once all the directories and files are set, both components can be activated by running
42-
```Bash
43-
podman-compose up -d
81+
and update some select configuration items with the indicated item
82+
```yaml
83+
FTS_IP: YOUR EXTERNAL URL HERE
4484
```
85+
Your external URL is your HOST COMPUTER'S EXTERNAL IP ADDRESS unless you have a very advanced configuration.
86+
87+
If you are running this behind your personal all-in-one cable modem/router/accesspoint combo then you probably need to do some port forwarding, however this is out of scope for this guide.
4588
46-
Or for docker runtime users
89+
Once the configuration in your compose.yaml is to your liking, you can then simply run your compose file.
90+
```shell
91+
podman-compose -f compose.yaml up -d
4792

48-
```Bash
49-
docker compose up -d
93+
OR
94+
95+
docker compose -f compose.yaml up -d
5096
```
5197

52-
### Configuration
53-
On first run, the appropriate configuration files will be created in the indicated directory.
98+
You can check how your containers are doing by running
99+
```shell
100+
podman logs freetakserver
101+
podman logs freetakserver-ui
54102

55-
From this point, you should stop the containers before editing the configuration files.
103+
OR
56104

57-
```Bash
58-
podman-compose down
59-
```
60-
or
61-
```Bash
62-
docker compose down
105+
docker logs freetakserver
106+
docker logs freetakserver-ui
63107
```
64108

65-
From this point, please follow the Linux installation guide for information regarding the configuration files.
109+
When done, you can stop everything by running
110+
```shell
111+
podman-compose -f compose.yaml down
112+
113+
OR
66114

115+
docker compose -f compose.yaml down
116+
```
67117
## Persistent Data
68118

69-
All persistent data is stored to /data and may be volume mounted.
70-
The host volume needs to be owned by user and group 1000.
119+
All persistent data is stored in the [volumes](https://docs.docker.com/engine/storage/volumes/) that are explicitly created in the sample compose file.
120+
121+
You can access it in your runtime volume store if needed, however you should probably NOT do this while the server is running.

0 commit comments

Comments
 (0)