[Unit] Description=OpenFUT: publish the FIFA17 container network namespace to /run/netns Documentation=file:///home/alex/OpenFUT/scripts/systemd/openfut-netns-bind.sh # PRODUCTION TEMPLATE — NOT INSTALLED. Staging runs in the host netns and needs # none of this; only production enters the `openfut-fut-backend` container's # namespace. After=docker.service Requires=docker.service [Service] Type=oneshot RemainAfterExit=yes # Re-resolves the container by NAME on every start, so no pid is ever hardcoded # and a container restart is repaired by restarting this unit. It exits non-zero # when the container is not running, which is what makes Core's Requires= on it # a real admission gate rather than decoration. ExecStart=/home/alex/OpenFUT/scripts/systemd/openfut-netns-bind.sh openfut-fut-backend openfut # Deliberately NO ExecStop unmount. Tearing the bind mount down while Core and # the host are still inside that namespace would strand them; the namespace is # owned by the container's lifetime, not by this unit's. StandardOutput=journal StandardError=journal SyslogIdentifier=openfut-netns [Install] WantedBy=multi-user.target