|
1 | 1 |
|
2 | 2 | # 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 | + |
3 | 6 |
|
4 | 7 | ## 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. |
6 | 28 |
|
7 | 29 | ## 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. |
10 | 31 |
|
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. |
12 | 33 |
|
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. |
15 | 35 |
|
| 36 | +**WE WILL NOT SUPPORT RUNNING CONTAINERS ON DOCKER DESKTOP ON YOUR WINDOWS PC.** |
16 | 37 |
|
| 38 | +Your Windows computer is not a good choice for hosting a server of any kind. |
17 | 39 |
|
18 | 40 | ## 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. |
19 | 44 |
|
20 | 45 | Please find all of our container images on [the GitHub Container Repository.](https://github.com/orgs/FreeTAKTeam/packages)
|
21 | 46 |
|
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. |
24 | 59 |
|
25 | 60 | ## Setup
|
26 | 61 | ### 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 | +``` |
30 | 67 |
|
31 | 68 | ### 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. |
32 | 70 |
|
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 | +``` |
37 | 75 |
|
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 | +``` |
40 | 80 |
|
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 |
44 | 84 | ```
|
| 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. |
45 | 88 |
|
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 |
47 | 92 |
|
48 |
| -```Bash |
49 |
| -docker compose up -d |
| 93 | +OR |
| 94 | + |
| 95 | +docker compose -f compose.yaml up -d |
50 | 96 | ```
|
51 | 97 |
|
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 |
54 | 102 |
|
55 |
| -From this point, you should stop the containers before editing the configuration files. |
| 103 | +OR |
56 | 104 |
|
57 |
| -```Bash |
58 |
| -podman-compose down |
59 |
| -``` |
60 |
| -or |
61 |
| -```Bash |
62 |
| -docker compose down |
| 105 | +docker logs freetakserver |
| 106 | +docker logs freetakserver-ui |
63 | 107 | ```
|
64 | 108 |
|
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 |
66 | 114 |
|
| 115 | +docker compose -f compose.yaml down |
| 116 | +``` |
67 | 117 | ## Persistent Data
|
68 | 118 |
|
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