services: upstream: build: context: docker/upstream ports: - "2222:22" restart: unless-stopped healthcheck: # nc is available in Alpine; tests that sshd is accepting TCP connections. test: ["CMD", "nc", "-z", "localhost", "22"] interval: 2s timeout: 3s retries: 10 start_period: 5s proxy: build: context: . command: ["-config", "/etc/proxy/config.yaml"] ports: - "2022:2022" volumes: # Mount your config file here: - ./config.example.yaml:/etc/proxy/config.yaml:ro # Session logs are written here: - ./logs:/var/log/ssh-proxy # Optional: persist the proxy host key across restarts so clients # don't see "host key changed" warnings. # - ./host_key:/etc/proxy/host_key depends_on: upstream: condition: service_healthy restart: unless-stopped