{"id":20845458,"url":"https://github.com/rafsaf/tribal-wars-planer","last_synced_at":"2026-03-15T03:04:19.690Z","repository":{"id":37940385,"uuid":"270408380","full_name":"rafsaf/Tribal-Wars-Planer","owner":"rafsaf","description":"Tribal Wars Planer django app, professional tool for creating outlines for off-game coordinators.","archived":false,"fork":false,"pushed_at":"2025-05-05T21:13:39.000Z","size":89257,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T21:35:56.696Z","etag":null,"topics":["cloud","django","docker","docker-compose","markdown","plemiona","postgresql","prometheus","python","tribal-wars"],"latest_commit_sha":null,"homepage":"https://plemiona-planer.pl","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafsaf.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,"zenodo":null}},"created_at":"2020-06-07T19:21:46.000Z","updated_at":"2025-05-05T20:46:08.000Z","dependencies_parsed_at":"2024-01-16T01:04:24.144Z","dependency_job_id":"4b6d5901-331f-4996-9cf4-aaa530f2db80","html_url":"https://github.com/rafsaf/Tribal-Wars-Planer","commit_stats":null,"previous_names":[],"tags_count":194,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2FTribal-Wars-Planer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2FTribal-Wars-Planer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2FTribal-Wars-Planer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2FTribal-Wars-Planer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafsaf","download_url":"https://codeload.github.com/rafsaf/Tribal-Wars-Planer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253180885,"owners_count":21866988,"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":["cloud","django","docker","docker-compose","markdown","plemiona","postgresql","prometheus","python","tribal-wars"],"created_at":"2024-11-18T02:13:02.451Z","updated_at":"2026-03-01T11:14:26.474Z","avatar_url":"https://github.com/rafsaf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![plemiona-planer](https://plemiona-planer.pl/static/images/background.avif)\n\n![Codecov](https://img.shields.io/codecov/c/github/rafsaf/Tribal-Wars-Planer)\n![GitHub](https://img.shields.io/github/license/rafsaf/Tribal-Wars-Planer)\n![tests](https://github.com/rafsaf/Tribal-Wars-Planer/actions/workflows/tests.yml/badge.svg)\n![stage_image_push.yml](https://github.com/rafsaf/Tribal-Wars-Planer/actions/workflows/stage_image_push.yml/badge.svg)\n![latest_image_push.yml](https://github.com/rafsaf/Tribal-Wars-Planer/actions/workflows/latest_image_push.yml/badge.svg)\n\n# Official Site and Discord\n\n### Discord channel: [discord.gg/g5pcsCteCT](https://discord.gg/g5pcsCteCT)\n\n### Production server: [plemiona-planer.pl](https://plemiona-planer.pl)\n\nStage environment: [stg.plemiona-planer.pl](https://stg.plemiona-planer.pl)\n\nTest coverage ~85%, see [Codecov raport](https://app.codecov.io/gh/rafsaf/Tribal-Wars-Planer)\n\n# Table of contents\n\n- [Official Site and Discord](#official-site-and-discord)\n    - [Discord channel: discord.gg/g5pcsCteCT](#discord-channel-discordggg5pcsctect)\n    - [Production server: plemiona-planer.pl](#production-server-plemiona-planerpl)\n- [Table of contents](#table-of-contents)\n- [Development](#development)\n- [Dockerfile reference](#dockerfile-reference)\n  - [TWP-server image](#twp-server-image)\n\n# Development\n\nIf you want to run it in development you will need\n\n- [python](https://www.python.org/downloads/) == 3.13\n- [poetry](https://python-poetry.org/)\n- [docker](https://www.docker.com/get-started)\n\nIn your favourite folder e.g. Desktop:\n\n```bash\ngit clone https://github.com/rafsaf/Tribal-Wars-Planer.git\ncd Tribal-Wars-Planer\n\n```\n\nThen create file `.env` in Tribal-Wars-Planer from template file `.env.example`\n\nThen run\n\n```bash\npoetry install\n\n# it will be default create virtualenv in ~.cache/pypoetry/virutalenvs/tribal-wars-planer-asod(some random signs)\n# You need to activate it.\n# Honestly, you can also use just python3.12 -m venv .venv and run pip install -r requirements-dev.txt but above is prefered way\npre-commit install\n\n# adds pre-commit stuff\n```\n\nRun database with docker and then python dev server\n\n```bash\ndocker-compose up -d postgres_dev\n# This set up db container\n\nbash scripts/initial.sh\n# migrations, creates admin/admin superuser, creates media and prometheus dirs, creates game servers\n\npython manage.py runserver\n# Runs development server at localhost:8000\n```\n\nTo run tests with coverage report\n\n```bash\npytest\n```\n\nTo run makemessages/compilemessages (the project is in English, every string is then translated to Polish)\n\n```bash\n# every machine - using dockerfiles\ndocker compose -f docker-compose.translation.yml run --rm trans\n\n```\n\n# Dockerfile reference\n\nThis project maintains one docker images, the same one for server and for scheduling tasks. It's hosted via dockerhub and supports arm64 and amd64 architectures.\n\n**NOTE, from 3.0.0 images support both linux/amd64 and linux/arm64 architectures.**\n\n**NOTE, from 4.0.0 image twp-cronjobs is deprecated, please update for support. Cronjobs tasks are now runned from the main image.**\n\n## TWP-server image\n\n[TWP-server image on dockerhub](https://hub.docker.com/r/rafsaf/twp-server)\n\n`rafsaf/twp-server:latest`\n\nNote, there are also other tags like `stage` or `stable`, but **latest** should be prefered choice.\n\nContains TWP Django server based on `python:3.13.3` docker image, with [nginx/1.18.0](https://www.nginx.com/) + [uwsgi](https://uwsgi-docs.readthedocs.io/en/latest/) for webserver stack and tiny Python cron-like lib [schedule](https://schedule.readthedocs.io/en/stable/) for tasks and many more open source software.\n\nEnvironment variables:\n\n**SECRET_KEY** - _required_ - app secret key\n\n**DEBUG** - _optional_ - debug boolean, defaults to `False`\n\n**DJANGO_SUPERUSER_USERNAME** - _optional_ - first superuser username, defaults to `admin`\n\n**DJANGO_SUPERUSER_PASSWORD** - _optional_ - first superuser password, defaults to `admin`\n\n**DJANGO_SUPERUSER_EMAIL** - _optional_ - first superuser email, defaults to `admin@admin.com`\n\n**MAIN_DOMAIN** - _optional_ - main domain used, defaults to `localhost`\n\n**SUB_DOMAIN** - _optional_ - sub domain used, defaults to empty string\n\n**CSRF_TRUSTED_ORIGINS** - _optional_ - list of domain that can perform POST and other unsafe requests to the app eg. `https://domain1,https://domain2,http://domain3`, see [django docs](https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS), defaults to `http://localhost:8000,http://localhost:7999`\n\n**POSTGRES_NAME** - _optional_ - postgres database name, defaults to `postgres`\n\n**POSTGRES_USER** - _optional_ - postgres database user, defaults to `postgres`\n\n**POSTGRES_PASSWORD** - _optional_ - postgres database password, defaults to `postgres`\n\n**POSTGRES_HOST** - _optional_ - postgres database host, defaults to `postgres`\n\n**POSTGRES_PORT** - _optional_ - postgres database port, defaults to `5432`\n\n**DATABASE_SSL_MODE_ON** - _optional_ - Require TLS/SSL when connecting to the database, defaults to `False`\n\n**DEFAULT_FROM_EMAIL** - _optional_ - email of site owner, used to send emails on errors and certs expiration, defaults to `example@example.com`\n\n**STRIPE_PUBLISHABLE_KEY** - _optional_ - stripe public key, defaults to empty string\n\n**STRIPE_SECRET_KEY** - _optional_ - stripe secret key, defaults to empty string\n\n**STRIPE_ENDPOINT_SECRET** - _optional_ - stripe endpoint, defaults to empty string\n\n**EMAIL_BACKEND** - _optional_ - email backend, refer to django docs, defaults to `django.core.mail.backends.console.EmailBackend`\n\n**AWS_ACCESS_KEY_ID** - _optional_ - AWS SES account key id, defaults to empty string\n\n**AWS_SECRET_ACCESS_KEY** - _optional_ - AWS SES account secret, defaults to empty string\n\n**AWS_SES_REGION_NAME** - _optional_ - AWS SES region, defaults to empty string\n\n**AWS_SES_REGION_ENDPOINT** - _optional_ - AWS SES region endpoint, defaults to empty string\n\n**METRICS_EXPORT_ENDPOINT_SECRET** - _optional_ - secret that allow (prometheus scrapers) access to `domain.com/api/metrics/?token=...`, defaults to `secret`\n\n**UWSGI_PROCESSES** - _optional_ - number of uwsgi processes spawned in the container, defaults to 1\n\n**PREMIUM_ACCOUNT_VALIDATION_ON** - _optional_ - is premium account required to create more targets, defaults to `False`\n\n**PREMIUM_ACCOUNT_MAX_TARGETS_FREE** - _optional_ - max targets allowed without premium account, defaults to `25`\n\n**REGISTRATION_OPEN** - _optional_ - is registration on site allowed, defaults to `True`\n\n**JOB_LIFETIME_MAX_SECS** - _optional_ - Stops cronjob function after JOB_LIFETIME_MAX_SECS seconds, defaults to `0` and that means it will not stop ever. If number is greater than `0`, it must be also greater or equal to `120` (2 min).\n\n**JOB_MIN_INTERVAL** - _optional_ - minimal time when database info about villages, players, worlds will be updated in minutes, defaults to `10`\n\n**JOB_MAX_INTERVAL** - _optional_ - maximal time when database info about villages, players, worlds will be updated in minutes, defautls to `15`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafsaf%2Ftribal-wars-planer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafsaf%2Ftribal-wars-planer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafsaf%2Ftribal-wars-planer/lists"}