Skip to content

feat(docker): Comprehensive Docker Setup Enhancement with Performance & Security Improvements #890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 148 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
8fbf8f7
feat(docker): enhance Docker setup with performance monitoring and se…
kzndotsh Jun 6, 2025
baf03e0
ci(docker-test.yml): enhance environment setup and performance thresh…
kzndotsh Jun 6, 2025
e6ccbcb
build(docker): enhance Dockerfile and test script for improved perfor…
kzndotsh Jun 6, 2025
c550e4e
chore(pre-commit): update Ruff version to v0.11.13 and adjust hook id
kzndotsh Jun 6, 2025
897533a
chore(docker-compose.dev.yml): remove security_opt no-new-privileges
kzndotsh Jun 6, 2025
abcaeb0
docs(DOCKER-TESTING.md): update performance benchmarks with configura…
kzndotsh Jun 6, 2025
e33bebd
chore(docker): enhance Docker cleanup safety and add comprehensive te…
kzndotsh Jun 6, 2025
0f14d38
chore(docs): remove outdated Docker documentation and scripts
kzndotsh Jun 6, 2025
7097201
fix(ci): update Docker test workflow to use unified docker-toolkit.sh…
kzndotsh Jun 6, 2025
77879d2
fix(Dockerfile): correct command execution for development start
kzndotsh Jun 6, 2025
414a5e3
fix(ci): add explicit permissions to jobs following least privilege p…
kzndotsh Jun 6, 2025
c7f30ca
docs(DOCKER.md): fix YAML syntax error with duplicate path keys in wa…
kzndotsh Jun 6, 2025
264d7de
docs(DOCKER.md): fix inconsistent script references to use unified do…
kzndotsh Jun 6, 2025
08f071e
fix(docker): move return statement to else block per TRY300 linter rule
kzndotsh Jun 6, 2025
5b82662
fix(docker): address additional Sourcery AI review feedback - improve…
kzndotsh Jun 6, 2025
388cea5
perf(docker): compile regex patterns outside loop for better performa…
kzndotsh Jun 6, 2025
8438f7f
fix(docker): explicit check parameter for subprocess.run to satisfy P…
kzndotsh Jun 6, 2025
799b600
docs: remove PERFORMANCE-MONITORING.md to streamline documentation
kzndotsh Jun 6, 2025
6bbffb0
ci(docker-test.yml): enhance environment setup and test execution
kzndotsh Jun 7, 2025
4d66bc6
feat(docker-toolkit.sh): enhance error handling for testing modes
kzndotsh Jun 7, 2025
14771f1
docs(docker.py): enhance docstring with security measures for subproc…
kzndotsh Jun 7, 2025
804da7e
build(Dockerfile): add coreutils and create symlinks for python and tux
kzndotsh Jun 7, 2025
42d16df
ci(docker-test.yml): update permissions and handle errors in performa…
kzndotsh Jun 7, 2025
1e93e4e
chore(workflow): limit Docker build to linux/amd64 platform
kzndotsh Jun 7, 2025
6b396a9
ci(workflows): separate automatic and manual docker test jobs
kzndotsh Jun 7, 2025
9426dcc
fix(Dockerfile): correct LICENSE file name to LICENSE.md for consistency
kzndotsh Jun 7, 2025
4fc1777
chore(dockerignore): update .dockerignore to include LICENSE.md
kzndotsh Jun 7, 2025
8cba336
ci(docker-test.yml): enhance CI workflow with performance and securit…
kzndotsh Jun 7, 2025
2ad297a
ci(pyright.yml): optimize workflow with caching and improve dependenc…
kzndotsh Jun 7, 2025
f75d06d
ci(pyright.yml): move Poetry installation step before Python setup an…
kzndotsh Jun 7, 2025
d302b88
ci(pyright.yml): update workflow name and improve environment setup
kzndotsh Jun 7, 2025
69338ef
chore(workflows): update linting and type-checking workflows for main…
kzndotsh Jun 7, 2025
83d6880
refactor(workflows): improve numeric checks and add helper function f…
kzndotsh Jun 7, 2025
179fb8b
fix(docker.py): enhance command validation and sanitization for security
kzndotsh Jun 7, 2025
41672e4
refactor(docker.py): extract common logic for Docker availability check
kzndotsh Jun 7, 2025
2f3a743
chore(docker-compose.dev.yml): simplify resource constraints configur…
kzndotsh Jun 7, 2025
ee90e83
ci(workflows): split cleanup job into specific jobs for auto, manual,…
kzndotsh Jun 7, 2025
59bc567
refactor(docker.py): remove unused shlex import and replace shlex.joi…
kzndotsh Jun 7, 2025
8819660
ci(docker-image.yml): update condition for removing old images to exc…
kzndotsh Jun 7, 2025
b188163
chore(github): consolidate and optimize GitHub workflows
kzndotsh Jun 7, 2025
6ec454c
test(docker.yml): update smoke tests to verify bot imports and basic …
kzndotsh Jun 7, 2025
9e20361
ci(ci.yml): enhance CI workflow with additional validations and auto-…
kzndotsh Jun 7, 2025
7573190
ci(workflows): update python command to python3 in docker.yml
kzndotsh Jun 7, 2025
ac89d68
ci(docker.yml): update python command to use default 'python' instead…
kzndotsh Jun 7, 2025
988f330
ci(docker.yml): specify entrypoint for docker run commands
kzndotsh Jun 7, 2025
59bc3e5
chore(docker.yml): streamline smoke test and production test scripts
kzndotsh Jun 7, 2025
c084978
ci(ci.yml): set fetch-depth to 0 for full git history in checkout step
kzndotsh Jun 7, 2025
b7c9554
ci(ci.yml): switch file format validation to Prettier for YAML, JSON,…
kzndotsh Jun 7, 2025
a5b8dc2
ci(ci.yml): fix path addition to GITHUB_PATH and improve Prisma clien…
kzndotsh Jun 7, 2025
90c3847
chore: update Renovate and GitHub Actions configurations
kzndotsh Jun 7, 2025
33d3d7c
chore(ci.yml): set default GitHub token placeholder for local testing
kzndotsh Jun 7, 2025
1dd09b8
chore: remove trailing whitespace and add missing newlines
kzndotsh Jun 7, 2025
5b560fa
ci(ci.yml): remove npm cache option from Node.js setup in CI workflow
kzndotsh Jun 7, 2025
9c91406
docs: update section titles and correct formatting in documentation
kzndotsh Jun 7, 2025
b91413b
ci(ci.yml): add installation step for docker-compose in CI workflow
kzndotsh Jun 7, 2025
b25c669
fix(docker-toolkit.sh): remove unnecessary braces in arithmetic expre…
kzndotsh Jun 7, 2025
a705a99
chore(ci.yml): update tj-actions/changed-files to v45.0.8 for improve…
kzndotsh Jun 7, 2025
e694867
fix(docker-compose): simplify env_file syntax in docker-compose files
kzndotsh Jun 7, 2025
8c0e628
style(docker-toolkit.sh): improve code readability and consistency
kzndotsh Jun 7, 2025
bb58d4d
refactor(docker-toolkit.sh): improve variable handling and enhance re…
kzndotsh Jun 7, 2025
ebbf638
ci(ci.yml): add step to create .env file for Docker Compose validation
kzndotsh Jun 7, 2025
6bfc50e
ci(ci.yml): update Docker Compose setup to use pre-installed v2
kzndotsh Jun 8, 2025
4326c6f
ci(workflows): rename job identifiers and variables for clarity
kzndotsh Jun 8, 2025
0486450
ci(ci.yml): add read permissions for contents in lint and infrastruct…
kzndotsh Jun 8, 2025
84d7c8f
ci(docker.yml): fix indentation for docker run command in test step
kzndotsh Jun 8, 2025
4642245
feat(docker): enhance Docker setup with performance monitoring and se…
kzndotsh Jun 6, 2025
057f27c
ci(docker-test.yml): enhance environment setup and performance thresh…
kzndotsh Jun 6, 2025
24f7b03
build(docker): enhance Dockerfile and test script for improved perfor…
kzndotsh Jun 6, 2025
5f9180d
chore(pre-commit): update Ruff version to v0.11.13 and adjust hook id
kzndotsh Jun 6, 2025
bb845fb
chore(docker-compose.dev.yml): remove security_opt no-new-privileges
kzndotsh Jun 6, 2025
c7fc01f
docs(DOCKER-TESTING.md): update performance benchmarks with configura…
kzndotsh Jun 6, 2025
f262a75
chore(docker): enhance Docker cleanup safety and add comprehensive te…
kzndotsh Jun 6, 2025
a2a527d
chore(docs): remove outdated Docker documentation and scripts
kzndotsh Jun 6, 2025
2b556b9
fix(ci): update Docker test workflow to use unified docker-toolkit.sh…
kzndotsh Jun 6, 2025
371b99d
fix(Dockerfile): correct command execution for development start
kzndotsh Jun 6, 2025
9b03486
fix(ci): add explicit permissions to jobs following least privilege p…
kzndotsh Jun 6, 2025
d6ef87b
docs(DOCKER.md): fix YAML syntax error with duplicate path keys in wa…
kzndotsh Jun 6, 2025
fb01511
docs(DOCKER.md): fix inconsistent script references to use unified do…
kzndotsh Jun 6, 2025
0fcc436
fix(docker): move return statement to else block per TRY300 linter rule
kzndotsh Jun 6, 2025
c15aaf5
fix(docker): address additional Sourcery AI review feedback - improve…
kzndotsh Jun 6, 2025
e9ef8a4
perf(docker): compile regex patterns outside loop for better performa…
kzndotsh Jun 6, 2025
e81919d
fix(docker): explicit check parameter for subprocess.run to satisfy P…
kzndotsh Jun 6, 2025
6040167
docs: remove PERFORMANCE-MONITORING.md to streamline documentation
kzndotsh Jun 6, 2025
38d65c2
ci(docker-test.yml): enhance environment setup and test execution
kzndotsh Jun 7, 2025
f4c0429
feat(docker-toolkit.sh): enhance error handling for testing modes
kzndotsh Jun 7, 2025
6f996b5
docs(docker.py): enhance docstring with security measures for subproc…
kzndotsh Jun 7, 2025
4cdd614
build(Dockerfile): add coreutils and create symlinks for python and tux
kzndotsh Jun 7, 2025
50dcbe3
ci(docker-test.yml): update permissions and handle errors in performa…
kzndotsh Jun 7, 2025
d306d0a
chore(workflow): limit Docker build to linux/amd64 platform
kzndotsh Jun 7, 2025
341548c
ci(workflows): separate automatic and manual docker test jobs
kzndotsh Jun 7, 2025
a2e5e05
fix(Dockerfile): correct LICENSE file name to LICENSE.md for consistency
kzndotsh Jun 7, 2025
3ae10f8
chore(dockerignore): update .dockerignore to include LICENSE.md
kzndotsh Jun 7, 2025
3b55afb
ci(docker-test.yml): enhance CI workflow with performance and securit…
kzndotsh Jun 7, 2025
99d6442
ci(pyright.yml): optimize workflow with caching and improve dependenc…
kzndotsh Jun 7, 2025
dfca47a
ci(pyright.yml): move Poetry installation step before Python setup an…
kzndotsh Jun 7, 2025
27fcdbe
ci(pyright.yml): update workflow name and improve environment setup
kzndotsh Jun 7, 2025
2f6b191
chore(workflows): update linting and type-checking workflows for main…
kzndotsh Jun 7, 2025
ab5a801
refactor(workflows): improve numeric checks and add helper function f…
kzndotsh Jun 7, 2025
f9f4f60
fix(docker.py): enhance command validation and sanitization for security
kzndotsh Jun 7, 2025
509b29b
refactor(docker.py): extract common logic for Docker availability check
kzndotsh Jun 7, 2025
bf56836
chore(docker-compose.dev.yml): simplify resource constraints configur…
kzndotsh Jun 7, 2025
eb68005
ci(workflows): split cleanup job into specific jobs for auto, manual,…
kzndotsh Jun 7, 2025
7eb223c
refactor(docker.py): remove unused shlex import and replace shlex.joi…
kzndotsh Jun 7, 2025
5fe7525
ci(docker-image.yml): update condition for removing old images to exc…
kzndotsh Jun 7, 2025
37e5f37
chore(github): consolidate and optimize GitHub workflows
kzndotsh Jun 7, 2025
42796c4
test(docker.yml): update smoke tests to verify bot imports and basic …
kzndotsh Jun 7, 2025
1b31a18
ci(ci.yml): enhance CI workflow with additional validations and auto-…
kzndotsh Jun 7, 2025
1b4a819
ci(workflows): update python command to python3 in docker.yml
kzndotsh Jun 7, 2025
ccc5a08
ci(docker.yml): update python command to use default 'python' instead…
kzndotsh Jun 7, 2025
21a5b88
ci(docker.yml): specify entrypoint for docker run commands
kzndotsh Jun 7, 2025
9974b59
chore(docker.yml): streamline smoke test and production test scripts
kzndotsh Jun 7, 2025
5a0aa81
ci(ci.yml): set fetch-depth to 0 for full git history in checkout step
kzndotsh Jun 7, 2025
34890c5
ci(ci.yml): switch file format validation to Prettier for YAML, JSON,…
kzndotsh Jun 7, 2025
8c2d337
ci(ci.yml): fix path addition to GITHUB_PATH and improve Prisma clien…
kzndotsh Jun 7, 2025
9345a72
chore: update Renovate and GitHub Actions configurations
kzndotsh Jun 7, 2025
b7d50c7
chore(ci.yml): set default GitHub token placeholder for local testing
kzndotsh Jun 7, 2025
c2c604d
chore: remove trailing whitespace and add missing newlines
kzndotsh Jun 7, 2025
e9cd4c7
ci(ci.yml): remove npm cache option from Node.js setup in CI workflow
kzndotsh Jun 7, 2025
905d4a5
docs: update section titles and correct formatting in documentation
kzndotsh Jun 7, 2025
31f34f9
ci(ci.yml): add installation step for docker-compose in CI workflow
kzndotsh Jun 7, 2025
d10103b
fix(docker-toolkit.sh): remove unnecessary braces in arithmetic expre…
kzndotsh Jun 7, 2025
76419dc
chore(ci.yml): update tj-actions/changed-files to v45.0.8 for improve…
kzndotsh Jun 7, 2025
269186a
fix(docker-compose): simplify env_file syntax in docker-compose files
kzndotsh Jun 7, 2025
0a22498
style(docker-toolkit.sh): improve code readability and consistency
kzndotsh Jun 7, 2025
7c59d64
refactor(docker-toolkit.sh): improve variable handling and enhance re…
kzndotsh Jun 7, 2025
a0f7b11
ci(ci.yml): add step to create .env file for Docker Compose validation
kzndotsh Jun 7, 2025
7f29bbf
ci(ci.yml): update Docker Compose setup to use pre-installed v2
kzndotsh Jun 8, 2025
9e3a128
ci(workflows): rename job identifiers and variables for clarity
kzndotsh Jun 8, 2025
463c970
ci(ci.yml): add read permissions for contents in lint and infrastruct…
kzndotsh Jun 8, 2025
f239984
ci(docker.yml): fix indentation for docker run command in test step
kzndotsh Jun 8, 2025
b45f77e
Merge branch 'fix/docker' of github.com:allthingslinux/tux into fix/d…
kzndotsh Jun 8, 2025
2a52d40
chore(docker-compose.dev.yml): update resource constraints to use dep…
kzndotsh Jun 8, 2025
634642b
feat(docker.py): expand allowed Docker subcommands for enhanced funct…
kzndotsh Jun 8, 2025
571903d
chore(workflows): add manual commit and base ref inputs to maintenanc…
kzndotsh Jun 9, 2025
477de40
chore(docker): update container references from 'app' to 'tux' for co…
kzndotsh Jun 9, 2025
0baf255
docs(Dockerfile): enhance documentation and comments for clarity and …
kzndotsh Jun 9, 2025
f07da44
feat(cli_usage.mdc): expand CLI usage documentation with new commands
kzndotsh Jun 9, 2025
e261cb6
chore: add .editorconfig and .gitattributes for consistent coding style
kzndotsh Jun 9, 2025
2ebd617
fix(Dockerfile): update prisma commands to use explicit python module…
kzndotsh Jun 9, 2025
093390b
feat(docker): enhance Docker testing and management with Python toolkit
kzndotsh Jun 9, 2025
d50cc77
ci(workflows): add test suite to CI pipeline and improve Docker valid…
kzndotsh Jun 9, 2025
189b627
ci(ci.yml): add Prisma client generation step to CI workflow
kzndotsh Jun 9, 2025
287e3d5
ci(ci.yml): update poetry install commands to include all necessary g…
kzndotsh Jun 9, 2025
25cdc04
ci(ci.yml): remove fail_ci_if_error option from Codecov action
kzndotsh Jun 9, 2025
ebc0c9b
ci(ci.yml): add coverage threshold and handle Codecov errors gracefully
kzndotsh Jun 9, 2025
e8ff56f
ci(codecov): add Codecov configuration and enhance CI workflow for te…
kzndotsh Jun 9, 2025
e3737da
ci(codecov): add codecov.yml for coverage configuration
kzndotsh Jun 9, 2025
80132d8
chore(codecov): replace codecov.yml with a more detailed .codecov.yml
kzndotsh Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
500 changes: 500 additions & 0 deletions .codecov.yml

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion .cursor/rules/cli_usage.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description:
description:
globs: tux/cli/**,README.md,DEVELOPER.md,pyproject.toml,docs/**
alwaysApply: false
---
Expand Down Expand Up @@ -40,5 +40,12 @@ See [tux/utils/env.py](mdc:tux/utils/env.py) for environment logic.
- `down`: Stops Docker services.
- `logs`: Shows container logs.
- `exec`: Executes a command inside a running container.
- `shell`: Opens an interactive shell in the container.
- `ps`: Shows running containers.
- `restart`: Restarts Docker services.
- `health`: Shows health status of containers.
- `cleanup`: Cleans up Tux-related Docker resources.
- `config`: Validates and displays Docker Compose configuration.
- `pull`: Pulls latest images from registry.

Refer to [DEVELOPER.md](mdc:DEVELOPER.md) for detailed examples and explanations.
6 changes: 3 additions & 3 deletions .cursor/rules/core.mdc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description:
globs:
description:
globs:
alwaysApply: false
---
# Core Functionality
Expand All @@ -15,4 +15,4 @@ This rule describes the core components and processes of the Tux bot.
- **Configuration (`tux/utils/config.py` & `tux/utils/env.py`)**: Configuration is managed through environment variables (loaded via `tux/utils/env.py`, likely using `.env` files) and a primary settings file (`config/settings.yml`) loaded and accessed via `tux/utils/config.py`. [tux/utils/config.py](mdc:tux/utils/config.py), [tux/utils/env.py](mdc:tux/utils/env.py), [config/settings.yml](mdc:config/settings.yml)
- **Error Handling (`tux/handlers/error.py`)**: Contains centralized logic for handling errors that occur during command execution or other bot operations. It remaps the tree for app command errors, defines `on_command_error` listeners and formats error messages for users and logging. [tux/handlers/error.py](mdc:tux/handlers/error.py)
- **Custom Help Command (`tux/help.py`)**: Implements a custom help command, overriding the default `discord.py` help behavior to provide a tailored user experience for discovering commands and features. [tux/help.py](mdc:tux/help.py)
- **Utilities (`tux/utils/`)**: A collection of helper modules providing various utility functions used across the codebase (e.g., logging setup, embed creation, time formatting, constants). [tux/utils/](mdc:tux/utils)
- **Utilities (`tux/utils/`)**: A collection of helper modules providing various utility functions used across the codebase (e.g., logging setup, embed creation, time formatting, constants). [tux/utils/](mdc:tux/utils)
2 changes: 1 addition & 1 deletion .cursor/rules/database_patterns.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description:
description:
globs: tux/database/**,prisma/**,tux/cli/database.py
alwaysApply: false
---
Expand Down
2 changes: 1 addition & 1 deletion .cursor/rules/development_setup.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description:
description:
globs: tux/cli/**,README.md,DEVELOPER.md,docs/**,pyproject.toml,.env
alwaysApply: false
---
Expand Down
16 changes: 8 additions & 8 deletions .cursor/rules/docker_environment.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description:
description:
globs: docker-compose.yml,docker-compose.dev.yml,Dockerfile,README.md,.github/workflows/docker-image.yml,tux/cli/docker.py,.dockerignore
alwaysApply: false
---
Expand Down Expand Up @@ -34,7 +34,7 @@ Commands are run using the `tux` CLI's `docker` group (ensure you are in develop
```
- Uses `docker-compose.dev.yml`.
- Mounts the codebase using `develop: watch:` for live code syncing (replaces Python hot-reloading).
- Runs `python -m tux --dev bot start` inside the `app` container.
- Runs `python -m tux --dev bot start` inside the `tux` container.

3. **Stop Services:**
```bash
Expand All @@ -43,21 +43,21 @@ Commands are run using the `tux` CLI's `docker` group (ensure you are in develop

## Interacting with Containers

Use `poetry run tux --dev docker exec app <command>` to run commands inside the `app` container.
Use `poetry run tux --dev docker exec tux <command>` to run commands inside the `tux` container.

- **Logs:** `poetry run tux --dev docker logs -f`
- **Shell:** `poetry run tux --dev docker exec app bash`
- **Shell:** `poetry run tux --dev docker exec tux bash`
- **Database Commands:** Must be run *inside* the container.
```bash
# Example: Push schema
poetry run tux --dev docker exec app poetry run tux --dev db push
poetry run tux --dev docker exec tux poetry run tux --dev db push
# Example: Create migration
poetry run tux --dev docker exec app poetry run tux --dev db migrate --name <name>
poetry run tux --dev docker exec tux poetry run tux --dev db migrate --name <name>
```
- **Linting/Formatting/Type Checking:** Must be run *inside* the container.
```bash
poetry run tux --dev docker exec app poetry run tux dev lint
poetry run tux --dev docker exec app poetry run tux dev format
poetry run tux --dev docker exec tux poetry run tux dev lint
poetry run tux --dev docker exec tux poetry run tux dev format
# etc.
```

Expand Down
4 changes: 2 additions & 2 deletions .cursor/rules/extensions_system.mdc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description:
globs:
description:
globs:
alwaysApply: false
---
# Extensions System
Expand Down
4 changes: 2 additions & 2 deletions .cursor/rules/project_structure.mdc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description:
globs:
description:
globs:
alwaysApply: false
---
# Tux Project Structure
Expand Down
10 changes: 2 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
"name": "Tux Development Container",
"dockerFile": "../Dockerfile",
"context": "..",
"runArgs": [
"--init",
"--env-file",
".env"
],
"forwardPorts": [
3000
],
"runArgs": ["--init", "--env-file", ".env"],
"forwardPorts": [3000],
"build": {
"target": "dev",
"args": {
Expand Down
55 changes: 51 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,57 @@
.env
# Environment files
.env*
!.env.example

# Python virtual environment and caches
.venv/
.cache/
__pycache__/
*.pyc
assets/
*.py[cod]
*$py.class
.pytest_cache/
.coverage
.mypy_cache/
.ruff_cache/

# Build artifacts
build/
dist/
*.egg-info/
.eggs/

# IDE/Editor files
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Documentation and development files
docs-build/
site/
*.md
!README.md
!LICENSE.md
!requirements.md

# Development configuration
.cursorrules
.editorconfig
.pre-commit-config.yaml

# Logs
*.log
logs/

# Git
.git/
.gitignore
.gitattributes

# Docker files (prevent recursive inclusion)
Dockerfile*
docker-compose*.yml
.dockerignore

# Cache directories
.cache/
89 changes: 89 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Default settings for all files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# Python files
[*.py]
indent_size = 4
max_line_length = 120

# Python stub files
[*.pyi]
indent_size = 4
max_line_length = 120

# Configuration files (YAML, TOML, JSON)
[*.{yaml,yml}]
indent_size = 2

[*.toml]
indent_size = 4

[*.json]
indent_size = 2

# Docker files
[{Dockerfile,*.dockerfile}]
indent_size = 4

[docker-compose*.yml]
indent_size = 2

# Shell scripts
[*.{sh,bash,zsh,fish}]
indent_size = 2

# Nix files
[*.nix]
indent_size = 2

# Web files (if any)
[*.{html,css,js,ts,jsx,tsx}]
indent_size = 2

# Markdown files
[*.md]
indent_size = 2
trim_trailing_whitespace = false

# Environment files
[.env*]
indent_size = 4

# Git files
[.git*]
indent_size = 4

# Lock files (read-only, preserve formatting)
[{poetry.lock,package-lock.json,yarn.lock,Pipfile.lock}]
insert_final_newline = false
trim_trailing_whitespace = false

# Makefile (requires tabs)
[{Makefile,makefile,*.mk}]
indent_style = tab
indent_size = 4

# Batch files (Windows)
[*.{bat,cmd}]
end_of_line = crlf

# Archive directory (preserve original formatting)
[.archive/**]
insert_final_newline = false
trim_trailing_whitespace = false

# Generated/cache directories (ignore)
[{__pycache__,*.pyc,.mypy_cache,.pytest_cache,.ruff_cache,node_modules}/**]
insert_final_newline = false
trim_trailing_whitespace = false
Loading
Loading