aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml (follow)
Commit message (Collapse)AuthorAgeLines
* Fix site startup command used in docker-compose.yml (#3093)Gravatar wookie1842024-06-13-1/+1
| | | Needed as entrypoint was changed in python-discord/site#1338
* Update old redis version in docker-composeGravatar wookie1842024-06-11-1/+1
|
* Temporarily remove suport for evaling under 3.10 (#2618)Gravatar ChrisJL2023-05-30-14/+1
| | | | | | | | | | * Temporarily remove suport for evaling under 3.10 This is until snekbox supports multi-version natively https://github.com/python-discord/snekbox/issues/158 * Remove special case 3.11 snekbox container 3.11 is the default in snekbox:latest now, so no need to have a special container. This also removes all notion of there being diferent containers for different snekbox versions
* Use documented spec extensions in docker composeGravatar Chris Lovering2023-04-22-25/+18
| | | | The previous method of '<<' no longer works with the latest version of docker compose. This method is what is documented in the [compose spec](https://github.com/compose-spec/compose-spec/blob/master/spec.md#extension)
* Add the required ports to snekbox urls in docker compose file (#2538)Gravatar ChrisJL2023-04-14-2/+2
|
* converge site_api_scheme & site_api into site_apiGravatar shtlrs2023-03-30-1/+1
|
* Merge #2408: Scaffold server config via a bootstrapping scriptGravatar Amrou Bellalouna2023-03-09-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor configuration into a pydantic-based python constants file, and add a utility to auto-populate guild data. Squashed commits: * use basic config for demo purposes * fix guiding comments * update var names for proper context reflection * fix wront iteration var * add all roles, & channels * load categories * separate sections in env file * ignore .env.server * rename change_log to changelog This also adds a default env file to look for * remove instantiation of webhooks * add most of the default configs These will mostly be fetched from the .env.default file, which won't be bootstrapped * warn when categories/roles/channels are not found * add env file to keep server defaults * fix malformatted value in the .env.default * add default server env variables * update the sections formatting in default env file * fallback to server env when loading constants * add guild basic defaults * update change_log channel name to changelog * add the Guid settings prefix * make _Guild inherit from EnvConfig * add webhook defaults * add python_news defaults to the server env * ad missing webhooks prefix * update bootstrapper logger name * update priority of the env loaded files According to Pydantic's docs: "Later files in the list/tuple will take priority over earlier files." * warn user that default value from PyDis' config will be used * add colours default config * add antispam config * update antispam references * add redis default cfg * add Stats, Cooldowns and CleanMessages consts This also includes their default values * add Metabase to constants This also includes its default values * add URLS to constants This also includes its default values * use the Field class to provide defaults This avoids overriding & changing the `fields` of the `Config` class "dynamically" * add keys constant class * add Guild conf * replace dash with underscore in script * appease linter * transform attributes of AntiSpam to dict when needed This ensures that the application stays backwards compatible * add root_validator for the colours class This enables the conversion from hex to int easily since it's not a supported type by pydantic * reinstate the role & channels combinations * rename URLS to URLs * add emojis & icons constants * add filter constants & their default values * remove all useless spaces * instantiate the keys class * add bot prefix to default env file * fetch Bot constants from env vars instead of the prefix ones * add Miscellaneous config * instantiate poor forgotten Miscellaneous config * add final touches to the constants module This includes removing dups, adding missing channels & fixing type casts * move all default values to constants.py This is done by using the `Field` class. It allows us to 1. Set defaults, in case the variables are not configured 2. Load them from a env variable under a specific name (for backwards comp) 3. load it from any env variable file that contains the right prefix * ignore all .env files * load BOT_TOKEN & GUILD_ID from .env * allow _GUILD to read its id from the `GUILD_ID` env var * base Webhooks settings off of a Webhook model * create necessary webhooks if non existent * appease flake8 docstrings error * make the script idempotent * update type hints * uppercase all consts * make webhook channel optional * add httpx to its own dependency group This group will be optional & only related to the bootstrapper * replace requests with httpx * pass client as param * include raise_for_status as a response hook * rename get_webhook to webhook_exists * update docstring of the constants module * use "." as a separator * update script to account for already created webhooks * make ANTI_SPAM_RULES a module level constant This ensures that flake8 doesn't complain about making a function call in the function's signature * remove the manual resolving of .env paths * update usages of AntiSpam constants * remove forgotten assignment of rule_config * remove useless assignments of env file names * delete default config-default.yml * update docstrings of CodeBlockCog to reference constants.py * add a poetry task that runs the bootstrapping script * add python-dotenv to the config-bootstrap group * update hook name to _raise_for_status * construct site_api in _URLs * remove __name__ == '__main__'guard * Revert "construct site_api in _URLs" This reverts commit 1c555c4280c6a0bdd452319cbd3ffcd0370f5d48. * remove usage of the Field class * update env var keys that the bootstrapping script needs * use API_KEYS.SITE_API as env var in docker compose instead of BOT_API_KEY * use basic config for demo purposes * fix guiding comments * update var names for proper context reflection * fix wront iteration var * add all roles, & channels * load categories * separate sections in env file * ignore .env.server * rename change_log to changelog This also adds a default env file to look for * remove instantiation of webhooks * add most of the default configs These will mostly be fetched from the .env.default file, which won't be bootstrapped * warn when categories/roles/channels are not found * add env file to keep server defaults * fix malformatted value in the .env.default * add default server env variables * update the sections formatting in default env file * fallback to server env when loading constants * add guild basic defaults * update change_log channel name to changelog * add the Guid settings prefix * make _Guild inherit from EnvConfig * add webhook defaults * add python_news defaults to the server env * ad missing webhooks prefix * update bootstrapper logger name * update priority of the env loaded files According to Pydantic's docs: "Later files in the list/tuple will take priority over earlier files." * warn user that default value from PyDis' config will be used * add colours default config * add antispam config * update antispam references * add redis default cfg * add Stats, Cooldowns and CleanMessages consts This also includes their default values * add Metabase to constants This also includes its default values * add URLS to constants This also includes its default values * use the Field class to provide defaults This avoids overriding & changing the `fields` of the `Config` class "dynamically" * add keys constant class * add Guild conf * replace dash with underscore in script * appease linter * transform attributes of AntiSpam to dict when needed This ensures that the application stays backwards compatible * add root_validator for the colours class This enables the conversion from hex to int easily since it's not a supported type by pydantic * reinstate the role & channels combinations * rename URLS to URLs * add emojis & icons constants * add filter constants & their default values * remove all useless spaces * instantiate the keys class * add bot prefix to default env file * fetch Bot constants from env vars instead of the prefix ones * add Miscellaneous config * instantiate poor forgotten Miscellaneous config * add final touches to the constants module This includes removing dups, adding missing channels & fixing type casts * move all default values to constants.py This is done by using the `Field` class. It allows us to 1. Set defaults, in case the variables are not configured 2. Load them from a env variable under a specific name (for backwards comp) 3. load it from any env variable file that contains the right prefix * ignore all .env files * load BOT_TOKEN & GUILD_ID from .env * allow _GUILD to read its id from the `GUILD_ID` env var * base Webhooks settings off of a Webhook model * create necessary webhooks if non existent * appease flake8 docstrings error * make the script idempotent * update type hints * uppercase all consts * make webhook channel optional * add httpx to its own dependency group This group will be optional & only related to the bootstrapper * replace requests with httpx * pass client as param * include raise_for_status as a response hook * rename get_webhook to webhook_exists * update docstring of the constants module * use "." as a separator * update script to account for already created webhooks * make ANTI_SPAM_RULES a module level constant This ensures that flake8 doesn't complain about making a function call in the function's signature * remove the manual resolving of .env paths * update usages of AntiSpam constants * remove forgotten assignment of rule_config * remove useless assignments of env file names * delete default config-default.yml * update docstrings of CodeBlockCog to reference constants.py * add a poetry task that runs the bootstrapping script * add python-dotenv to the config-bootstrap group * update hook name to _raise_for_status * construct site_api in _URLs * remove __name__ == '__main__'guard * Revert "construct site_api in _URLs" This reverts commit 1c555c4280c6a0bdd452319cbd3ffcd0370f5d48. * remove usage of the Field class * update env var keys that the bootstrapping script needs * use API_KEYS.SITE_API as env var in docker compose instead of BOT_API_KEY * relock dependencies * update snekbox's defaults * add support for ot channels * rename help_system_forum to python_help * rename nomination_archive to nomination_voting_archive * rename appeals2 to appeals_2 * yeet sprinters role out * rename all big_brother_logs instances to big_brother The purpose is to adhere to what we have in prod * rename bootstrap_config.py to botstrap.py * update module name of the configure poetry task * update error messages to reflect the new keys needed for env variables * install dotenv as an extra with pydantic * update all prefixes to "_" (underscore) * log tuple of (channel_name, channel_id) in the config verifier * update needed default values for docker compose env var * relock dependencies * update forgotten delimiters & env prefixes
* Bump PSQL version in docker-composeGravatar mbaruh2022-10-28-1/+1
|
* Update the docker-compose snekbox dep for botGravatar Chris Lovering2022-08-14-1/+1
| | | | The bot service was still configured to depend on the snekbox service, even though this service is now optional, in favour of the snekbox-311 service.
* Start 3.11 snekbox container by defaultGravatar Chris Lovering2022-07-21-2/+2
| | | | Since snekbox uses 3.11 by default, it makes sense for this one to be started by default, and the 3.10 container to be opt-in.
* Add required config and constants for snekbox 3.11Gravatar Chris Lovering2022-07-16-0/+12
|
* Add missing restart-policy to metricity containerGravatar Chris Lovering2022-01-26-0/+1
|
* Disable File Logging By DefaultGravatar Hassan Abouelela2021-11-20-1/+0
| | | | | | | Place logging to file behind an environment variable, and remove special considerations made for it. Signed-off-by: Hassan Abouelela <[email protected]>
* Add metricity to docker-composeGravatar Chris Lovering2021-09-17-1/+21
| | | | | | By adding metricity to the compose, we allow it to migrate itself, rather than needing the site to do it. Defaulting 'USE_METRICITY' to false means that it will run migrations, but not actually start the bot. This means we don't add another service that needs to run all the time, which could impact some contribs on lower powered hardware.
* Docker-compose: upgrade to postgres 13Gravatar Matteo Bertucci2021-06-27-1/+1
| | | See https://git.pydis.com/site/pull/545
* Change to unless-stopped restart policyGravatar Chris2021-06-06-1/+1
| | | | | | Since we use the same port for redis on all out projects, having this always restart causes conflicts for people starting up docker and wanting to use redis for anyother project.
* Merge branch 'main' into laundmo-compose-restart-logGravatar laundmo2021-05-04-3/+2
|\
| * Compose: read all environment variables from '.env'Gravatar kwzrd2021-03-12-4/+2
| |
| * Compose: read GitHub API key from '.env'Gravatar kwzrd2021-03-11-0/+1
| |
* | Update docker-compose.ymlGravatar laundmo2021-02-23-0/+20
|/
* Pull snekbox image from GHCR in docker-composeGravatar Sebastiaan Zeeff2020-11-18-1/+1
| | | | | | | | We're in the process of migrating snekbox to the GitHub Container Repository, which will replace DockerHub. I've changed docker-compose to reflect that change. Signed-off-by: Sebastiaan Zeeff <[email protected]>
* Use GHCR for the site container in docker-composeGravatar Sebastiaan Zeeff2020-11-15-1/+1
| | | | | | | | | | | The docker-compose file should pull the site container from the GitHub Container Registry instead of DockerHub, as the latter will not receive new container images. Snekbox currently still pulls from DockerHub as it's not yet migrated to GHCR. Signed-off-by: Sebastiaan Zeeff <[email protected]>
* Add Metricity DB URL to site (docker-compose.yml)Gravatar ks1292020-10-11-0/+1
|
* Add snekbox to the Docker compose fileGravatar MarkKoz2020-06-05-0/+9
|
* Expose the redis port to the hostGravatar MarkKoz2020-05-25-0/+2
| | | | | | Useful for those that run redis with docker-compose but not the bot. The bot on the host won't have access to the Docker network in such case so the port must be exposed.
* Adding redis to docker-compose file.Gravatar Leon Sandøy2020-05-16-0/+4
| | | | | This is almost hilariously easy since we can just use the official image for it.
* Fix missing Django logs when using Docker ComposeGravatar MarkKoz2020-02-16-0/+2
| | | | | Fixed by allocating a pseudo-tty to the web and bot services in Docker Compose.
* Revert "Revert "Use OAuth to be Reddit API compliant""Gravatar Joseph2019-12-13-0/+2
|
* Revert "Use OAuth to be Reddit API compliant"Gravatar Joseph2019-12-13-2/+0
|
* Add reddit environment variable, change User-Agent and fix lint problemGravatar Jens2019-10-22-0/+2
|
* Bump the site PostgreSQL version to 12.Gravatar Johannes Christ2019-10-12-1/+1
|
* Make `bot` wait for `web`, use `latest` web image.Gravatar scragly2019-09-30-2/+3
|
* Update site to use new manage.py, add bot dev compose.Gravatar scragly2019-09-28-7/+20
|
* Create default django admin user.Gravatar scragly2019-09-24-1/+3
|
* Add a dev-only compose for new devs who don't have `site`.Gravatar scragly2019-09-24-0/+28