this post was submitted on 28 Sep 2024
5 points (100.0% liked)

Container platforms (docker, lxc, podman)

302 readers
5 users here now

A place to discuss everything related to Container platforms and runtimes. Docker, LXC, Podman, OpenShift, OCI, and more.

founded 1 year ago
MODERATORS
 

Hello,

I have two Podman containers. One container that contains Linkstack and another container for the Nginx Proxy Manager. Now I want the Nginx Proxy Manager to retrieve the website from the Linkstack container. Unfortunately this does not work.

I integrate the two containers in a network. I realize this with podman-compose.

First, I created the network with "podman network create n_webservice".

Compose.yaml

services: NGINXPM: networks: - n_webservice container_name: NGINXPM volumes: - /home/fan/pod_volume/npm/data/:/data/ - /home/fan/pod_volume/npm/letsencrypt/:/etc/letsencrypt ports: - 8080:80 - 4433:443 - 9446:81 image: docker.io/jc21/nginx-proxy-manager:latest linkstack: networks: - n_webservice container_name: linkstack ports: - 4430:80 image: docker.io/linkstackorg/linkstack networks: n_webservice: external: n_webservice

I have tried everything possible in the Nginx Proxy Manager with the entry, but unfortunately I can't get any further. The destinations http://linkstack:4430 and http://127.0.0.1:4430 are not working.

Can someone please help me how I can access the linkstack container from the NGINXPM container?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] static09 2 points 1 day ago (1 children)

I had the same issues when I first started out with podman. The solution I found was to make a pod and place the containers within the pod. They'll be able to access each other through localhost:port. If you need ports published outside the pod, then they'll need to be specified during pod creation.

I didn't use podman-compose, so I can't speak specifically to how you'll go about this with a compose yaml.

It took many pages of websites for me to find something I understood. I'll see if I can find which websites I used and post them in a bit.

[โ€“] [email protected] 1 points 1 day ago (1 children)

Thank you ๐Ÿ™ Can you post a sample for the configuration, please?

[โ€“] static09 1 points 1 day ago* (last edited 1 day ago)

Here is the article I used to help me understand what I wanted to do. Hiding away in the actual Podman tutorials lol. Once I get my laptop up and running, i'll post my config since it's running in my learning environment and I haven't done anything with podman in my prod homelab; however, this let me get two containers (database and webapp) connecting together.

https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md#Communicating-between-containers-and-pods

My environment is podman in AlmaLinux 9.4 SELinux inside a Hyper-V VM on Windows 11. I can access the webpapp in the podman pod from outside my laptop.