{"id":19204672,"url":"https://github.com/openttd/bananas-server","last_synced_at":"2025-05-12T16:10:48.756Z","repository":{"id":36986750,"uuid":"243618829","full_name":"OpenTTD/bananas-server","owner":"OpenTTD","description":"OpenTTD's content server (in-game)","archived":false,"fork":false,"pushed_at":"2024-05-01T00:11:25.000Z","size":276,"stargazers_count":2,"open_issues_count":4,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-01T01:28:19.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenTTD.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-27T21:18:40.000Z","updated_at":"2024-05-01T01:28:19.951Z","dependencies_parsed_at":"2024-04-18T17:28:54.251Z","dependency_job_id":"61fe6208-0e69-45e5-bcc9-f1f68889c6e1","html_url":"https://github.com/OpenTTD/bananas-server","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fbananas-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fbananas-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fbananas-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fbananas-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenTTD","download_url":"https://codeload.github.com/OpenTTD/bananas-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223829226,"owners_count":17210000,"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":[],"created_at":"2024-11-09T13:09:23.495Z","updated_at":"2024-11-09T13:09:24.071Z","avatar_url":"https://github.com/OpenTTD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BaNaNaS Server\n\n[![GitHub License](https://img.shields.io/github/license/OpenTTD/bananas-server)](https://github.com/OpenTTD/bananas-server/blob/main/LICENSE)\n\nThis is the server serving the in-game client for OpenTTD's content service, called BaNaNaS.\nIt works together with [bananas-api](https://github.com/OpenTTD/bananas-api), which serves the HTTP API.\n\nSee [introduction.md](https://github.com/OpenTTD/bananas-api/tree/main/docs/introduction.md) for more documentation about the different BaNaNaS components and how they work together.\n\n## Development\n\nThis API is written in Python 3.11 with aiohttp, and makes strong use of asyncio.\n\n### Running a local server\n\n#### Dependencies\n\n- Python3.11 or higher.\n\n#### Preparing your venv\n\nTo start it, you are advised to first create a virtualenv:\n\n```bash\npython3 -m venv .env\n.env/bin/pip install -r requirements.txt\n```\n\n#### Starting a local server\n\nNext, you can start the HTTP server by running:\n\n```bash\n.env/bin/python -m bananas_server --web-port 8081 --storage local --index local\n```\n\nThis will start the HTTP part of this server on port 8081 and the content server part on port 3978 for you to work with locally.\nYou will either have to modify the client to use `localhost` as content server, or change your `hosts` file to change the IP of `binaries.openttd.org` and `content.openttd.org` to point to `127.0.0.1`.\n\n### Running via docker\n\n```bash\ndocker build -t openttd/bananas-server:local .\nexport BANANAS_COMMON=$(pwd)/../bananas-common\nmkdir -p \"${BANANAS_COMMON}/local_storage\" \"${BANANAS_COMMON}/BaNaNaS\"\ndocker run --rm -p 127.0.0.1:8081:80 -p 127.0.0.1:3978:3978 -v \"${BANANAS_COMMON}/local_storage:/code/local_storage\" -v \"${BANANAS_COMMON}/BaNaNaS:/code/BaNaNaS\" openttd/bananas-server:local\n```\n\nThe mount assumes that [bananas-api](https://github.com/OpenTTD/bananas-api) and this repository has the same parent folder on your disk, as both servers need to read the same local storage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenttd%2Fbananas-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenttd%2Fbananas-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenttd%2Fbananas-server/lists"}