|
1 | 1 | !!! abstract "Installation Instructions - Community Guides" |
2 | | - These are beginner's guides/installation instructions for additional platforms generously provided by users of these platforms. When in doubt, verify the details with the [project README](https://github.com/tubearchivist/tubearchivist#installing). If you see any issues here while using these instructions, please contribute. |
| 2 | + These are beginner's guides/installation instructions for additional platforms generously provided by users of these platforms. When in doubt, verify the details with the [project README](https://github.com/tubearchivist/tubearchivist#installing). If you see any issues here while using these instructions, please contribute. |
3 | 3 |
|
4 | | -!!! warning "Outdated" |
5 | | - Please review these instructions and update it to the changes introduced in [v0.5.0](https://github.com/tubearchivist/tubearchivist/releases/tag/v0.5.0). |
6 | | - |
7 | | -Podman handles container hostname resolution slightly differently than Docker, so you need to make a few changes to the `docker-compose.yml` to get up and running. |
| 4 | +Podman handles some things slightly differently than Docker, so you need to make a few changes to the `docker-compose.yml` to get up and running. |
8 | 5 |
|
9 | 6 | ### Installation Changes from Compose Instructions |
10 | 7 |
|
11 | | -Follow the installation instructions for [Docker Compose](docker-compose.md), with a few additional changes to the `docker-compose.yml`. |
| 8 | +Follow the installation instructions for [Docker Compose](docker-compose.md), edit the `docker-compose.yml` with these additional changes: |
| 9 | + |
| 10 | +#### Configure Pod |
| 11 | + |
| 12 | +Add the following to the bottom of your compose file so that all the containers will reside within the same pod: |
| 13 | + |
| 14 | +``` yaml |
| 15 | +x-podman: |
| 16 | + in_pod: true |
| 17 | +``` |
| 18 | +
|
| 19 | +This will allow the containers to share the same network namespace. Tube Archivist, Redis, and ElasticSearch will be able to communicate with each other using localhost (127.0.0.1) or their container names using DNS. Check here for more information on [Pod Networking](https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md#communicating-between-containers-and-pods) |
| 20 | +
|
| 21 | +#### Image URL |
| 22 | +
|
| 23 | +For each of the container `image` tags prefix the container name with `docker.io/` (or your container registry of choice). |
12 | 24 |
|
13 | | -Edit the `docker-compose.yml` with these additional changes: |
| 25 | +#### Redis & ElasticSearch Ports |
14 | 26 |
|
15 | | -#### Tube Archivist |
| 27 | +For `archivist-redis` and `archivist-es` remove the whole `expose: ["<PORT>"]` entry as it is not needed when running in a pod. |
16 | 28 |
|
17 | | - - under `tubearchivist` > `image`: |
18 | | - prefix the container name with `docker.io/` (or the url of your container registry of choice). |
19 | | - - under `tubearchivist` > `environment`: |
20 | | - `ES_URL`: change `archivist-es` to reflect the internal IP of the computer that will be running the containers. |
21 | | - `REDIS_HOST`: change `archivist-redis` to reflect the internal IP of the computer that will be running the containers (should be the same as above). |
| 29 | +#### Auto Restarting Containers (optional) |
22 | 30 |
|
23 | | -#### Redis |
| 31 | +To enable starting of containers after reboots you can either: |
24 | 32 |
|
25 | | - - under `archivist-redis` > `image`: |
26 | | - prefix the container name with `docker.io/` again. |
27 | | - - under `archivist-redis` > `expose`: |
28 | | - change the whole entry from `expose: ["<PORT>"]` into `ports: ["<PORT>:<PORT>"]`. |
29 | | - |
30 | | - ???+ example |
31 | | - `ports: ["6379:6379"]` |
| 33 | +* Enable the systemd podman restart service |
32 | 34 |
|
33 | | -#### Elasticsearch |
| 35 | + ``` shell |
| 36 | + systemctl enable podman-restart.service |
| 37 | + ``` |
34 | 38 |
|
35 | | - - under `archivist-es` > `image`: |
36 | | - prefix the container name with `docker.io/` again. |
37 | | - - under `archivist-es` > `expose`: |
38 | | - change the whole entry from `expose: ["<PORT>"]` into `ports: ["<PORT>:<PORT>"]`. |
39 | | - |
40 | | - ???+ example |
41 | | - `ports: ["9200:9200"]` |
| 39 | + ``` yaml |
| 40 | + restart: unless-stopped |
| 41 | + ``` |
42 | 42 |
|
43 | | -### Create service files (optional) |
| 43 | + ``` yaml |
| 44 | + restart: always |
| 45 | + ``` |
44 | 46 |
|
45 | | -Since Podman doesn't run as a service, it can't start containers after reboots without some additional configuration. |
| 47 | +* Start your pod directly with systemd quadlets. |
46 | 48 |
|
47 | | -If you want to enable this behavior, you can follow [this example](https://techblog.jeppson.org/2020/04/create-podman-services-with-podman-compose/) to have `systemd` start up the containers with `podman-compose` when the computer boots up. |
| 49 | +[Podman systemd Docs](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html) |
48 | 50 |
|
49 | 51 | ### Support |
50 | 52 |
|
|
0 commit comments