• 0 Posts
  • 44 Comments
Joined 5 months ago
cake
Cake day: October 13th, 2024

help-circle
rss
  • 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.










  • Do you actually need to move the admin ui off of port 80/443 if you are just forwarding ports? I don’t think you need to. That said I actually don’t know much about port forwarding since I use Tailscale because of CGNAT.

    My understanding of port forwarding is that you are forwarding connections to your WAN IP/port to a LAN IP/port. Since the router admin ui is available only on LAN by default, you don’t need to change it’s port from 80/443.







  • 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