So, I’ve given up waiting for a response on this botched v2 migration and tried to re-create everything from scratch, and it still doesn’t work :-/
This is a complete log of what I’ve done. Deploying an app with an attached volume works, but scaling it down and up fails, and the volume can’t be deleted.
This is my fly.toml
:
app = "pacman-ghost-gitea2"
kill_signal = "SIGINT"
kill_timeout = 30
processes = []
[build]
image = "gitea/gitea:1.17.2"
[env]
PRIMARY_REGION = "sin"
# IMPORTANT: This configures sshd inside the container to listen on a different port (since fly.io uses port 22
# for itself outside the VM, and configuring a service for it on another port exposes it to the internet).
# Gitea in a container doesn't honor this setting in app.ini :-/
# https://github.com/go-gitea/gitea/issues/7361#issuecomment-618592882
# When the container starts, it generates /etc/ssh/sshd_config from a template:
# https://github.com/go-gitea/gitea/blob/291787a5efaa2352241a25bcd75ff69eac23c4f0/docker/root/etc/s6/openssh/setup#L54
# which gets the port number from this environment variable. Sigh...
SSH_LISTEN_PORT = "3022"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 3000
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[[services]]
internal_port = 3022
protocol = "tcp"
# NOTE: Removed a health check here.
[[mounts]]
source = "pacman_ghost_gitea2_data"
destination = "/data"
There used to be a health check for the SSH port, but I took that out, in case Fly was getting confused because the machine wasn’t coming up properly, but the same thing happens.
Something is deeply screwed with volumes.