{"id":15015323,"url":"https://github.com/kivy/kivy-server","last_synced_at":"2025-10-19T14:32:06.373Z","repository":{"id":52599691,"uuid":"72456163","full_name":"kivy/kivy-server","owner":"kivy","description":"Docker configuration for the Kivy server","archived":false,"fork":false,"pushed_at":"2022-08-24T09:16:06.000Z","size":105,"stargazers_count":12,"open_issues_count":0,"forks_count":10,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-29T15:44:44.243Z","etag":null,"topics":["docker","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kivy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-31T16:35:05.000Z","updated_at":"2024-03-29T10:33:17.000Z","dependencies_parsed_at":"2022-09-07T06:20:56.548Z","dependency_job_id":null,"html_url":"https://github.com/kivy/kivy-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivy%2Fkivy-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kivy","download_url":"https://codeload.github.com/kivy/kivy-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237087530,"owners_count":19253548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose"],"created_at":"2024-09-24T19:46:45.759Z","updated_at":"2025-10-19T14:32:01.082Z","avatar_url":"https://github.com/kivy.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kivy Server\n\n## Quickly deploy changes\n\n```shell\nssh root@kivy.org\ncd ~/docker/kivy-server\ngit pull\ndocker-compose build\ndocker-compose up -d\n```\n\n## Usage\n\nThese are some of the most common tasks that are performed by maintainers.\n\nYou can connect directly to the `downloads` container to maintain\nthe directory served at https://kivy.org/downloads/.\n\n```shell\nssh -p 2458 root@kivy.org\ncd /web/downloads\n```\n\nConnect to the host to manage the server.\n\n```shell\nssh root@kivy.org\n```\n\nKeep the host up to date.\n\n```shell\napt-get update\napt-get dist-upgrade\n```\n\nThe server repository is located at `~/docker/kivy-server`.\nSecrets are kept in the `.env` folder, and they are referenced\nby services in `docker-compose.yml` and certain Dockerfiles.\n\n```shell\ncd ~/docker/kivy-server\n```\n\nPull changes from GitHub.\n\n```shell\ngit pull\n```\n\nImages and the containers created from them can be referenced\nby their service names.\n\n```shell\n# list services declared in `docker-compose.yml`\ndocker-compose config --services\n```\n\nBuild the images.\n\n```shell\n# build new/changed images\ndocker-compose build\n# build all images without using the cache\ndocker-compose build --no-cache\n# build a specific image\ndocker-compose build nginx\n```\n\nCreate containers from updated or new images and start all services.\nUse this command to deploy changes.\n\n```shell\ndocker-compose up -d\n```\n\nStop and remove containers and networks.\n\n```shell\ndocker-compose down\n```\n\nStart existing containers.\n\n```shell\ndocker-compose start\n# start a specific container\ndocker-compose start nginx\n```\n\nStop running containers.\n\n```shell\ndocker-compose stop\n# stop a specific container\ndocker-compose stop nginx\n```\n\nInspect the logs.\n\n```shell\n# list logs for all containers\ndocker-compose logs\n# follow logs for all containers\ndocker-compose logs -f\n# follow logs for a specific container\ndocker-compose logs -f nginx\n# follow logs starting from the last 100 lines\ndocker-compose logs -f --tail 100 nginx\n```\n\nGet a shell in a running container. If `bash` is not available in the container,\nuse `sh`.\n\n```shell\ndocker-compose exec docs bash\n```\n\nStart, stop and restart the Docker service.\n\n```shell\nservice docker start\nservice docker stop\nservice docker restart\n```\n\nAdd access for team member (do the following for both `ssh -p 2458 root@kivy.org` and `ssh root@kivy.org`)\n\n```shell\n# get public ssh key from them (`cat ~/.ssh/id_rsa.pub`)\n# open keys in nano\nnano ~/.ssh/authorized_keys\n# in nano paste their key in a new line (should be something like `ssh-rsa AAAAB...iSTP username@hostname`)\n# save in nano and exit\n```\n\nRemove access for team member (do the following for both `ssh -p 2458 root@kivy.org` and `ssh root@kivy.org`)\n\n```shell\n# open keys in nano\nnano ~/.ssh/authorized_keys\n# locate line with their key, delete it with ctrl-k\n# save and exit\n```\n\nAdd ssh key for CI to push to downloads and use it in the CI\n\nOn the download server:\n```shell\n# access download server\nssh -p 2458 root@kivy.org\n# generate key for the service (e.g. github)\nssh-keygen -t ed25519 -C \"kivy-repo@githubci\" -q -N \"\"\n# it prompts where to save it, give it unique name\nEnter file in which to save the key (/root/.ssh/id_ed25519): /root/.ssh/id_ed25519_kivy_ghci\n# copy the key\ncat ~/.ssh/id_ed25519_kivy_ghci.pub\n# and add it to the host's authorized_keys using nano\nnano ~/.ssh/authorized_keys\n# save nano\n\n# copy the private key from terminal\ncat ~/.ssh/id_ed25519_kivy_ghci\n```\nNow, go to repo of interest and paste the private key as a secrent variable (e.g. `UBUNTU_UPLOAD_KEY`).\nIn the yml do:\n```yaml\nenv:\n  UBUNTU_UPLOAD_KEY: ${{ secrets.UBUNTU_UPLOAD_KEY }}\n```\nAnd to use it do:\n```shell\nprintf \"%s\" \"$UBUNTU_UPLOAD_KEY\" \u003e ~/.ssh/id_rsa\nchmod 600 ~/.ssh/id_rsa\necho -e \"Host $1\\n\\tStrictHostKeyChecking no\\n\" \u003e\u003e ~/.ssh/config\n```\n\n## Troubleshoot low disk space\n\nInspect disk space usage of the host.\n\n```shell\ndf -h\n```\n\nInspect disk space usage of Docker.\n\n```shell\n# overview\ndocker system df\n# verbose\ndocker system df -v\n```\n\nInspect a folder within a running container.\n\n```shell\ndocker-compose exec downloads bash\n# check directory size\ndu -h -s /web/downloads\n```\n\n#### Clear Docker data\n\nCheck out the [docs](https://docs.docker.com/config/pruning/)\nto learn more about the commands listed below.\n\nRemove stopped containers.\n\n```shell\ndocker container prune\n```\n\nRemove images that are not used by existing containers.\n\n```shell\ndocker image prune -a\n```\n\nRemove volumes that are not used by existing containers.\n**WARNING! Persistent data is stored in volumes.**\n\n```shell\ndocker volume prune\n```\n\nRemove networks that are not used by existing containers.\n\n```shell\ndocker network prune\n```\n\nShortcut for all of the above.\n\n```shell\ndocker system prune --volumes\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkivy%2Fkivy-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkivy%2Fkivy-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkivy%2Fkivy-server/lists"}