Skip to content

Commit a7a4f30

Browse files
authored
Update Podman Docs (#70)
1 parent 793f216 commit a7a4f30

1 file changed

Lines changed: 34 additions & 32 deletions

File tree

mkdocs/docs/installation/podman.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,52 @@
11
!!! 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.
33

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

96
### Installation Changes from Compose Instructions
107

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).
1224

13-
Edit the `docker-compose.yml` with these additional changes:
25+
#### Redis & ElasticSearch Ports
1426

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

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

23-
#### Redis
31+
To enable starting of containers after reboots you can either:
2432

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
3234

33-
#### Elasticsearch
35+
``` shell
36+
systemctl enable podman-restart.service
37+
```
3438

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+
```
4242

43-
### Create service files (optional)
43+
``` yaml
44+
restart: always
45+
```
4446

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

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

4951
### Support
5052

0 commit comments

Comments
 (0)