Asparagus0098

joined 6 months ago

My bash prompt is just me copying the prompt I have set on fish.

# Prompt
green=$'\e[38;5;2m'
bright_red=$'\e[38;5;9m'
bright_green=$'\e[38;5;10m'
reset=$'\e[0m'

prompt_command()
{
    local exit_status=$?

    if [[ $exit_status != 0 ]]; then
        exit_color=$bright_red
        exit_prompt=" [$exit_status]"
    else
        exit_color=$bright_green
        exit_prompt=""
    fi
}

PROMPT_COMMAND=prompt_command
PS1='\[$green\]\w\[$exit_color\]$exit_prompt\n❯ \[$reset\]'

I have a small issue with this prompt though. Sometimes the ❯ ends up turning white for some reason.

[–] Asparagus0098@sh.itjust.works 2 points 1 month ago* (last edited 1 month ago)

Containers within a pod can use localhost to access each other. Containers outside of the pod needs to use the pod name to access the containers in the pod.

[–] Asparagus0098@sh.itjust.works 2 points 1 month ago (2 children)

I looked up when pasta became the default networking backend for rootless and it seems to have been with podman 5.0. I do remember using podman 5.x versions, so I was most likely using pasta.

The reason why I seperated each app into their own network was indeed for security. The only container with access to all the networks is the reverse proxy.

[–] Asparagus0098@sh.itjust.works 3 points 1 month ago* (last edited 1 month ago) (4 children)

I made a comment on another post a while ago, talking a bit about inter-container/pod networking.

https://sh.itjust.works/comment/17072681

[–] Asparagus0098@sh.itjust.works 2 points 1 month ago* (last edited 1 month ago)

I ran a podman quadlet setup as a test some time ago. My setup was a little like this:

  • Create a pod if the app uses multiple containers
  • Create a seperate network for each app (an app is either a single container or multiple containers grouped in a pod)
  • Add the reverse proxy container to all networks
  • I don't expose any ports to the host unless necessary

If you create a new network in podman you can access other containers and pods in the same network with their name like so container_name:port or pod_name:port. This functionality is disabled in the default network by default. This works at least in the newer versions last I tried, so I have no idea about older podman versions.

For auto-updates just add this in your .container file under [Container] section:

[Container]
AutoUpdate=registry

Now there's two main ways you can choose to update:

  1. Enable podman-auto-update.timer to enable periodic updates similar to watchtower
  2. Run podman auto-update manually
# Check for updates
podman auto-update --dry-run

# Update containers
podman auto-update