1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
Commit graph

1455 commits

Author SHA1 Message Date
kzndotsh
70a6f1fd77 chore(.gitignore): remove venv.bak/ and modify env.bak/ to .env.bak to correctly ignore backup environment files 2024-09-14 02:01:04 -04:00
kzndotsh
5e912bdb6f refactor(docker-compose.dev.yml): rename container names to follow naming convention
fix(docker-compose.dev.yml): change .env.dev to .env for environment file path to match production environment
refactor(docker-compose.dev.yml): rename volume from tux_data to data for consistency
feat(docker-compose.dev.yml): use environment variables for adminer default settings for better security and configurability
2024-09-14 02:00:52 -04:00
kzndotsh
e628a7672f refactor(config.py): simplify environment variable loading process
- Removed the logic for loading environment-specific .env files based on TUX_ENV. Now, only a single .env file is loaded.
- Removed the generation of DATABASE_URL from other environment variables. Now, it is directly fetched from the environment variables.
- These changes were made to simplify the configuration process and reduce potential points of failure.
2024-09-14 02:00:38 -04:00
kzndotsh
dff8140153 feat: add set_env.sh script to manage environment variables
This script allows to set environment variables for different environments (dev, prod) by sourcing respective .env files. It also backs up existing .env file, and exports additional dynamically computed variables. This change is done to simplify and automate the process of environment configuration.
2024-09-14 02:00:19 -04:00
kzndotsh
3cb1c5c00f chore(postgres-init.sh): remove unused initialization script for PostgreSQL 2024-09-14 01:59:43 -04:00
kzndotsh
601b648a00 refactor(config.py): remove hardcoded dotenv path to allow dotenv to find .env file automatically
feat(config.py): add POSTGRES_DB and POSTGRES_USER environment variables for more flexible database configuration
fix(config.py): update DATABASE_URL to include new POSTGRES_DB and POSTGRES_USER variables for accurate database connection string
2024-09-12 06:22:39 -04:00
kzndotsh
0acd313b6d feat(docker-compose.dev.yml): enable TUX_ENV environment variable for development environment
chore(docker-compose.dev.yml): add .cache/ to watch ignore list to prevent unnecessary rebuilds
feat(docker-compose.dev.yml): trigger rebuild on changes to pyproject.toml and poetry.lock for dependency updates
refactor(docker-compose.dev.yml): remove leading ./ from .env.dev path for consistency
feat(docker-compose.dev.yml): add command to bot service to install dependencies and run prisma commands before starting the app
feat(docker-compose.dev.yml): uncomment adminer service for database management
feat(docker-compose.dev.yml): add environment variables and command to adminer service for automatic login
feat(docker-compose.dev.yml): add adminer-index.php config for automatic login script
style(docker-compose.dev.yml): add newline at end of file for POSIX compliance
2024-09-12 06:22:26 -04:00
kzndotsh
64c4b47d56 chore(.dockerignore): add .cache/ to .dockerignore to prevent Docker from including cache files in the build context 2024-09-12 06:21:35 -04:00
kzndotsh
eca382a342 chore(Dockerfile): remove unnecessary mkdir and chmod commands for /app/.cache/prisma
refactor(Dockerfile): remove 'prisma py fetch' from CMD as it's no longer needed for the application to run
2024-09-12 06:21:23 -04:00
kzndotsh
0371e57ecc feat(pyproject.toml): capitalize project name to 'Tux' for better branding
feat(pyproject.toml): add 'package-mode' set to false to disable package mode
feat(pyproject.toml): add 'emojis' package to the dependencies for emoji support
chore(pyproject.toml): move 'emojis' package from the bottom to the correct alphabetical order in the dependencies
feat(pyproject.toml): add 'cache-dir' in 'tool.ruff' for caching ruff files
feat(pyproject.toml): add 'tool.prisma' configuration for Prisma ORM settings
2024-09-12 06:20:52 -04:00
kzndotsh
bb707f2017 feat(docker-compose.dev.yml): rename service 'tux' to 'bot' and container name to 'tux-bot' for better clarity
feat(docker-compose.dev.yml): add environment variable support for development environment
feat(docker-compose.dev.yml): change .env path to .env.dev for development environment
feat(docker-compose.dev.yml): add volume mapping for application code and postgres initialization script
feat(docker-compose.dev.yml): add entrypoint for postgres service to run initialization script
feat(docker-compose.dev.yml): change healthcheck command for postgres service
chore(docker-compose.dev.yml): comment out adminer service as it's not needed in development environment
feat(scripts/postgres-init.sh): add new script for postgres initialization with dynamic password setup
2024-09-11 13:57:13 -04:00
kzndotsh
1d08ac4b55 feat(prisma): initialize database schema and migration lock
This commit introduces the initial database schema for the application. It includes the creation of several tables such as "Guild", "GuildConfig", "Case", "Snippet", "Note", "Reminder", "AFKModel", "Starboard", and "StarboardMessage". Each table has its own set of columns, constraints, and indices.

In addition, the commit also introduces a migration lock file for Prisma, which is crucial for managing database migrations in a team environment. This file should not be edited manually and should be included in the version control system.
2024-09-11 13:56:12 -04:00
kzndotsh
450c1887fb refactor: replace Constants with Config in multiple files for better configuration management
The Constants module was replaced with a Config module in multiple files. This change was made to improve the management of configuration variables, making it easier to modify and maintain them. The Config module provides a more flexible and scalable way to handle configuration settings.
2024-09-11 13:55:45 -04:00
kzndotsh
7c7080a018 refactor(constants.py): remove unused imports and configuration loading
feat(constants.py): hardcode EMBED_COLORS and EMBED_ICONS for simplicity and to avoid unnecessary config file dependencies
2024-09-11 13:55:18 -04:00
kzndotsh
9a5e886369 feat(utils/config.py): add new configuration file to manage environment variables and settings
This new configuration file will load environment variables from .env files based on the TUX_ENV variable. It also loads settings from a YAML file and provides a Config class to access these settings. This change was made to centralize configuration management and improve code readability.
2024-09-11 13:55:02 -04:00
kzndotsh
be0e1b2ded feat: add .env.dev.example and .env.prod.example files for better environment configuration
refactor: simplify .env.example by removing unnecessary variables and adding TUX_ENV variable
chore: update .gitignore to ignore new environment files
refactor: simplify settings.yml.example by removing unnecessary variables
2024-09-11 13:54:33 -04:00
8f0cda359e Move to local postgres DB 2024-09-11 09:13:26 -04:00
de9667a08e
Merge pull request #545 from allthingslinux/tess-docker-ghcr
Create docker-image.yml
2024-09-11 07:29:14 -04:00
8ba6eaf452
Create docker-image.yml 2024-09-11 07:25:15 -04:00
Kasen Engel
962d98da65
Merge pull request #542 from allthingslinux/donor-icons
added donor roles
2024-09-10 16:45:46 -05:00
Kasen Engel
3cfba32ca4
Merge branch 'main' into donor-icons 2024-09-10 16:42:35 -05:00
kzndotsh
d14a4999ad
Merge pull request #526 from allthingslinux/tess-change-flags 2024-09-10 08:58:22 -04:00
kzndotsh
baa83e9c47
Merge branch 'main' into tess-change-flags 2024-09-10 08:56:24 -04:00
kzndotsh
41a33974f9
Merge pull request #540 from allthingslinux/tess-perm-optimization 2024-09-10 08:55:32 -04:00
kzndotsh
0d866cb6c4
Merge branch 'main' into tess-perm-optimization 2024-09-10 08:53:34 -04:00
kzndotsh
54d6130cf7 refactor(moderation): change return type of send_dm method to bool to track DM status
feat(moderation): add dm_sent parameter to handle_case_response method to handle DM status
fix(moderation): update all moderation actions to use new send_dm and handle_case_response methods
feat(moderation): add DM status to embed description in handle_case_response method
fix(unjail.py): ensure jail role is removed even if no previous roles are found
2024-09-10 12:51:17 +00:00
2e1ed2c4f3 refactor(utils): improve documentation 2024-09-10 08:48:27 -04:00
ef024d93b2 Remove randomizer in flag generator 2024-09-10 08:45:47 -04:00
32561a6ba4 Descriptive argument placeholders in generate_usage 2024-09-10 08:43:48 -04:00
kzndotsh
74f539f54d
Merge pull request #537 from allthingslinux/tess-patch-starboard 2024-09-10 08:13:00 -04:00
kzndotsh
bd2360d107
Merge pull request #536 from allthingslinux/reportimprovment 2024-09-10 08:12:42 -04:00
Kasen Engel
01b18a8ec1 added donor roles 2024-09-10 06:31:02 -05:00
1572fe87e4 Rewrite checks.py 2024-09-10 06:09:14 -04:00
86a99cd267
Merge pull request #538 from allthingslinux/renovate/pydantic-2.x-lockfile
fix(deps): update dependency pydantic to v2.9.1
2024-09-10 05:50:39 -04:00
db8dab1fcc
Merge pull request #539 from allthingslinux/renovate/sentry-sdk-2.x-lockfile
fix(deps): update dependency sentry-sdk to v2.14.0
2024-09-10 05:50:22 -04:00
6d46ed3bc2 Don't edit the starboard post if same amount of stars 2024-09-10 05:33:26 -04:00
366d5abab6 feat(starboard): add quiet attempt to remove the reaction if it's by the message author 2024-09-10 05:22:18 -04:00
e143b37d09 Refactor starboard methods to clean up duplicate code 2024-09-10 05:19:04 -04:00
renovate[bot]
ea86c6172b
fix(deps): update dependency sentry-sdk to v2.14.0 2024-09-09 16:40:34 +00:00
renovate[bot]
33caa418a8
fix(deps): update dependency pydantic to v2.9.1 2024-09-09 12:28:23 +00:00
8bc360c2b2 feat(starboard.py): Add on_raw_reaction_clear_emoji 2024-09-09 07:22:24 -04:00
04ae7d0a16 feat(starboard.py): Add on_raw_reaction_clear 2024-09-09 07:20:42 -04:00
d7b820b8de fix(starboard.py): Refactor starboard methods for better performance 2024-09-09 07:13:39 -04:00
7fd8a0dd9e fix(starboard.py): Refactor starboard_on_reaction_add method for better readability and performance 2024-09-09 06:38:28 -04:00
a69b360ed4 fix(starboard.py): Make the starboard check lighter on the API 2024-09-09 06:36:15 -04:00
Atmois
774049acad
create thread for each report 2024-09-08 15:35:18 +01:00
Atmois
582f99e845
made reports anonymous again 2024-09-08 15:12:17 +01:00
kzndotsh
af015e0314 docs(embeds.py): refactor docstrings to numpy style for better readability and consistency
fix(embeds.py): update default user avatar URL to point to the new location in the project repository
2024-09-08 06:24:49 +00:00
kzndotsh
1df9994a44 assets: add avatar.png 2024-09-08 02:23:55 -04:00
kzndotsh
c2db2b60e6
Merge branch 'main' into tess-change-flags 2024-09-08 02:20:39 -04:00