{"id":18425745,"url":"https://github.com/faforever/faf-stack","last_synced_at":"2025-04-07T16:32:06.368Z","repository":{"id":37271141,"uuid":"80214904","full_name":"FAForever/faf-stack","owner":"FAForever","description":"Aggregate project that allows to set up and manage a complete FAF environment within minutes","archived":false,"fork":false,"pushed_at":"2024-10-24T21:29:09.000Z","size":897,"stargazers_count":16,"open_issues_count":13,"forks_count":18,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2024-10-26T09:12:09.107Z","etag":null,"topics":["docker","docker-compose","faforever","server-configuration"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FAForever.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-01-27T14:39:03.000Z","updated_at":"2024-10-24T21:29:13.000Z","dependencies_parsed_at":"2023-11-10T20:31:38.197Z","dependency_job_id":"7af975e6-00d8-46d8-af00-4ff9f343da56","html_url":"https://github.com/FAForever/faf-stack","commit_stats":null,"previous_names":[],"tags_count":323,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FAForever","download_url":"https://codeload.github.com/FAForever/faf-stack/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223286475,"owners_count":17120000,"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","faforever","server-configuration"],"created_at":"2024-11-06T05:05:24.633Z","updated_at":"2024-11-06T05:05:25.270Z","avatar_url":"https://github.com/FAForever.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FAF Stack\n\nThis repository aims to provide a ready-to-go Docker Compose setup for managing the complete FAF stack (or parts of it) with simple commands.\n\nThe FAF production and test server use this repository and therefore guarantee close-to-production readyness.\n\n## Structure\n\nThe FAF stack consist of multiple components:\n\n* Service definitions in .yml files\n* Global and application level configuration\n* Application data\n\nThis repository contains only templates of the configuration and no data. \"Real\" configuration and data are excluded by `.gitignore`. In fact, all files and directories are excluded if not explicitly un-ignored within `.gitignore`. The data directory will be automatically created.\n\n### Service definitions\n\nFAF is a very complex infrastructure. In order to make it easier for new developers to get into it, we split the services across multiple docker-compose files:\n\n* `docker-compose.yml` contains all **core** services of FAF. If you want to start developing for FAF you can concentrate on this particular file.\n* `faf-extra.yml` contains services for the FAF community which are not required for the core infrastructure to run.\n* `monitoring.yml` contains dedicated monitoring applications which provide insights on the load and behavior of the FAF applications\n\n### Configuration\n\nOn root level there needs to be an `.env` file which contains some global setup.\n\nEach service has its own directory within `config`. They usually contain an environment file and/or other configuration files needed for the service to operate properly. Environment files are loaded by Docker Compose and additional files/directories may be mounted as volumes (both as specified in their respective `.yml` file).\n\nThe `config` directory does not exist and has to be copied from `config.templates`. After that, it has to be kept in sync with updates to `config.templates` manually (like when a parameter has been added, renamed or removed).\nIf you don't need / want to change the application config, you could also create a **symlink** from `config.template` to `config`. This way you will always have the latest default config. \n\n### Data\n\nSome services need to persist files in volumes, or read files of other services. All volumes are created inside \nthe `data` directory.\n\n**Attention Windows users**: Docker for Windows has some troubles mounting volumes to your hard disk. You need to configure access to the drive and even then some services might refuse to work. For a better experience we recommend using a virtual machine running Linux or at least running docker in the Windows Subsystem for Linux (WSL).\n\n## Naming\n\nTo keep things intuitive and avoid conflicts, all services, network aliases, user names, folder names and environment files follow a\nconsistent naming.\n\n## Usage\n\n### Prerequisites\n\n* [Docker](https://github.com/docker/docker/releases) 20.10.7-ce or newer\n* [Docker Compose](https://github.com/docker/compose/releases) v1.28.6 or newer\n\n(It might work with older versions but is not tested on these.)\n\n### Copy configuration template files\n\n    cp -R config.template config\n    cp .env.template .env\n\n\n### Recreate security keys (for production systems)\n\nIn folder `config/faf-java-api/pki` replace `private.key` and `public.key` with new keys generated with `ssh-keygen -m pem`. The secret key needs to be in rsa format and the public key in ssh-rsa format (see config.template for examples).\n\nHint: Some linux distros generate 3072 bit RSA keys by default (e.g. Arch). 3072 bit is not supported. Please use 2048 bit or 4096 bit key length.  \n\n\n### Initialize core services\n\n    scripts/init-all.sh\n\nThis will launch some core services and generate system users, database schemas and OAuth clients.\n\n### Load test data\n\nAfter initialization you will have a blank database - no logins, no maps, etc. In all likelihood you'd like to load some data to use this environment. You could look at the [test data](https://github.com/FAForever/db/blob/develop/test-data.sql), the [sanitized db dump](https://github.com/FAForever/faf-db-dump/tree/2294e41bae36acaed4a52c8a7d090ddd76001a25) or [API server integration test data](https://github.com/FAForever/faf-java-api/tree/develop/src/inttest/resources/sql). Each of these has pros and cons and commonly becomes stale (as schema evolves etc), and you may need to fiddle with data to match new schemas; database repository history may help.\n\nTo load the data, you'd run a command along the lines of -\n\n    docker exec -i  faf-db mysql -D faf -uroot -pbanana \u003c $DB_REPO/test-data.sql\n\n### Update database schema\n\nIf new migrations were added since you've initialized your environment, you can run them with -\n\n    docker-compose run --rm faf-db-migrations migrate\n\n# Service specific configurations\n\n## Grafana\n\n### Initial Setup\n\n1. Log into Grafana using `admin/admin`\n1. Add a Prometheus datasource named `Prometheus` at `http://faf-prometheus:9090`\n1. Go to global organization settings and change the name from `Main org.` to `Forged Alliance Forever`. This is \nrequired to enable anonymous access, too.\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaforever%2Ffaf-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaforever%2Ffaf-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaforever%2Ffaf-stack/lists"}