Commit graph

23 commits

Author SHA1 Message Date
51de3c7a6d
feat(dev): Enable hot reloading and streamline local development
This commit significantly improves the local development experience by enabling hot reloading for the Django application. This is achieved by installing the project as an editable package within the Docker services.

Key changes:

- **Hot Reloading:**
    - Modified `docker-compose.yml` for `web` and `celery` services to use `uv pip install --editable . --no-deps`.
    - Mounted the project root (`./`) to `/code` in `web` and `celery` services to facilitate the editable install.
- **Docker & Build Enhancements:**
    - Added `uv` binary to stage-1 in the `Dockerfile` for faster package operations.
    - Adjusted file permissions in `Dockerfile` during the app copy.
    - Set `DEBUG=true` for the `web` service in `docker-compose.yml` for easier local debugging.
    - Changed `restart` policy to `unless-stopped` for `web` and `celery` dev services.
    - Added a healthcheck for the `redis` service in the dev `docker-compose.yml`.
- **Code & Script Cleanup:**
    - Removed the custom `HealthCheckView` from the `home` app, as health checks are now handled by django-health-checks.
    - Updated paths and commands in `scripts/entrypoint.sh`, `scripts/prebuild.sh`, and `scripts/reset-db_make-migrations_seed-data.sh` to align with the new setup and remove obsolete steps (e.g., db cache table creation; we now use redis).
2025-05-23 21:19:33 -07:00
d4948e7cd3
fix: Ensure deploy script runs once and is part of entrypoint
The deploy.sh script is now re-added to the entrypoint.sh script
to ensure it runs only during first container startup.

A flag file (/flags/.deployed) is now created after a successful deployment.
The deploy.sh script checks for this flag and will not re-run
deployment steps unless FORCE_DEPLOY is set to true. This prevents
unnecessary re-runs of migrations, collectstatic, etc., on subsequent
container starts within the same deployment.

Corrected permissions for `/app/.cursor-server` and created a `/flags`
directory with appropriate permissions in the `Dockerfile`. Added
ENV DJANGO_SETTINGS_MODULE with default value to `Dockerfile`.
2025-05-23 18:39:29 -07:00
6f57699c8d Major refactoring of build_deploy action, along with docker building and packaging improvements. Added no_signups and other .env improvements. There is no longer a separate .env.dev, both use .env now. 2025-05-18 11:27:59 -07:00
89cfa50519 Add devcontainer support for production-parity debugging 2025-05-09 20:33:12 -07:00
762361a21b Finish packaging and change to src-based packaging layout, replace caddy with haproxy for performance, and update docker-compose and Dockerfiles for new packaging. 2025-05-09 18:49:34 -07:00
959b06c425 Packaging fixes 2025-05-09 08:43:43 -07:00
2dba19a77e Small refactor of scripts, Dockerfile, and docker-compose to support load balancing, and mutiple replicas. Various fixes related to playwright installation in container environment, static file handling, and etc. 2025-05-06 23:14:36 -07:00
9c41f63247 Complete refactor of environment configuration and Docker setup for development and production.
- Dev and prod both now run with the same exact docker configuration, except the .env file copied in.
- Removed the `.env` file and added a new `.env.dev` file for development settings, including database configuration and API keys.
- Introduced a `.envrc` file for automatic venv activation.
- Updated `deploy.sh` to utilize `uv` for running management commands and added a command for building Tailwind CSS.
- Created `docker-compose.yml` for local development with PostgreSQL, ensuring proper service dependencies.
- Deleted unnecessary files such as `docker-compose_db_only.yml` and `requirements.txt` to streamline the project structure.
2025-05-05 21:48:59 -07:00
8d316f07ce change .env to be softlink 2025-04-29 12:05:54 -07:00
6a44ef30a3 build fixes and static files fix, closes #28 2025-04-19 17:10:46 -07:00
6c631d7a4b remove PYTHONDONTWRITEBYTECODE completely from Dockerfile as any value is interpreted as true 2025-04-17 18:42:01 -07:00
4bb81de1e4 Small fixes to improve project stability 2025-04-17 18:36:45 -07:00
b894b60b65 reorganizing build scripts 2025-04-17 16:21:26 -07:00
bd7a65975f Bugfixes for emails and bugfixes for trade acceptance quantities being checked on create, closes #1 2025-04-08 00:59:40 -07:00
262f0ea190 fix card badges to have better rarity visibility and other bugfixes 2025-04-06 22:33:01 -07:00
05a279fa3a various small bugfixes; add cards list view 2025-03-28 16:03:31 -07:00
d5f8345581 Rewrite how trade offer png's are generated to try to reduce system resources. Only render the specific html code necessary and not the entire trade offer details page. 2025-03-28 00:49:40 -07:00
f3a1366269 Fix gravatar hovercards, and add trade_offer image generation with playwright, for use with opengraph tags on trade_offer_detal.html 2025-03-20 23:59:22 -07:00
b97ddde71c fix card_multiselect filtering and quantity controls 2025-03-13 15:48:26 -07:00
d62956d465 finished conversion to tailwind 2025-03-11 23:47:20 -07:00
0b8e6c2d50 Add tailwind and daisyUI 2025-03-11 23:47:19 -07:00
71b3993326 Initial working version with minor bugs 2025-02-26 00:17:06 -08:00
wsvincent
f946e4933a clone from upstream lithium project 2025-02-26 00:17:06 -08:00