Raspbian 13 ミラー変更

ls -la /etc/apt/sources.list.d/
sudo nano /etc/apt/sources.list.d/raspi.sources
Types: deb
URIs: http://raspbian.raspberrypi.com/raspbian/
Architectures: armhf
Suites: trixie
Components: main contrib non-free rpi
Signed-By: /usr/share/keyrings/raspbian-archive-keyring.gpg
http://raspbian.raspberrypi.com/raspbian/
↓
https://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian/

mapproxy

sudo apt update
sudo apt install -y podman podman-compose

mkdir -p ~/mapproxy && cd ~/mapproxy

mkdir -p mapproxyconfig/cache_data
nano mapproxyconfig/mapproxy.yaml
services:
  demo:
  wms:
    md:
      title: "Rakuten Mobile 5G Coverage"
      abstract: "Rakuten Mobile 5G area map via MapProxy"

layers:
  - name: rakuten_5g
    title: "Rakuten Mobile 5G Coverage"
    sources: [rakuten_5g_cache]

caches:
  rakuten_5g_cache:
    grids: [webmercator]
    sources: [rakuten_5g_wms]

sources:
  rakuten_5g_wms:
    type: wms
    req:
      url: https://area-map.rmb-ss.jp/5g
      layers: 5g
      transparent: true
      format: image/png
    supported_srs: ['EPSG:3857']
    coverage:
      bbox: [12000000, 2500000, 17000000, 5500000]
      srs: 'EPSG:3857'

grids:
  webmercator:
    base: GLOBAL_WEBMERCATOR

globals:
  cache:
    base_dir: /mapproxy/config/cache_data
    lock_dir: /mapproxy/config/cache_data/locks
touch mapproxyconfig/logging.ini
chmod -R a+rwx mapproxyconfig/cache_data

nano podman-compose.yml
version: "3.8"

services:
  mapproxy:
    image: ghcr.io/mapproxy/mapproxy/mapproxy:1.16.0-nginx
    container_name: mapproxy
    ports:
      - "8080:80"
    volumes:
      - ./mapproxyconfig/mapproxy.yaml:/mapproxy/config/mapproxy.yaml:Z
      - ./mapproxyconfig/logging.ini:/mapproxy/config/logging.ini:Z
      - ./mapproxyconfig/cache_data:/mapproxy/config/cache_data:Z
    environment:
      MULTIAPP_MAPPROXY: "false"
      MULTIAPP_ALLOW_LISTINGS: "false"
    restart: unless-stopped
podman-compose up -d
http://localhost:8080/mapproxy/demo/

rsshub

sudo apt update
sudo apt install -y podman podman-compose

mkdir -p ~/rsshub && cd ~/rsshub
nano compose.yaml
services:
  rsshub:
    image: docker.io/diygod/rsshub:latest
    restart: always
    ports:
      - "1200:1200"
    environment:
      NODE_ENV: production
      CACHE_TYPE: redis
      REDIS_URL: "redis://localhost:6379/"
      PLAYWRIGHT_WS_ENDPOINT: "ws://localhost:3000"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:1200/healthz"]
      interval: 30s
      timeout: 10s
      retries: 3
    depends_on:
      - redis
      - browserless

  browserless:
    image: docker.io/browserless/chrome:latest
    restart: always
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/pressure"]
      interval: 30s
      timeout: 10s
      retries: 3

  redis:
    image: docker.io/redis:alpine
    restart: always
    volumes:
      - redis-data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 5s

volumes:
  redis-data:

インストール

podman-compose up -d

# 起動確認
podman ps
# ユーザーがログアウトしてもコンテナを維持する設定
sudo loginctl enable-linger $USER

# 自動起動用サービスを登録
mkdir -p ~/.config/systemd/user/
nano ~/.config/systemd/user/rsshub.service
[Unit]
Description=RSSHub Podman Compose Service
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=%h/rsshub
ExecStart=/usr/bin/podman-compose up -d
ExecStop=/usr/bin/podman-compose down

[Install]
WantedBy=default.target
# 1. 新しいサービスファイルをシステムに認識させる
systemctl --user daemon-reload

# 2. 自動起動を有効化し、今すぐサービスを連動させる
systemctl --user enable --now rsshub.service

sudo loginctl enable-linger $USER
podman-compose down
podman-compose up -d