Restructure scripts into dev/ and prod/ for the devcontainer

- scripts/prod: entrypoint, db-setup and schema.sql shipped in the image
- scripts/dev: seed/clear db, psql and cleanup, run natively in the
  devcontainer instead of via docker-compose
- move setup.cfg to the repo root so linters pick it up
- Makefile targets run directly in the devcontainer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
finnandClaude Opus 5.5 committed 2026-10-21 08:39:28 +00:00
1 parent 7c2b9fb3f4
commit 9895017385
10 files changed
+36 -30

No files matched your search

+12 -27
View File
@@ -1,36 +1,21 @@
# DEVELOPMENT SERVER
# DEV
seed-dev: clear-dev
FLASK_APP=max.app FLASK_DEBUG=1 scripts/dev/seed-db.sh
seed-dev:
scripts/entrypoint-dev.sh
clear-dev:
scripts/dev/clear-db.sh
build-dev:
docker build -t max:dev -f Dockerfile.dev .
run-dev:
FLASK_APP=max.app FLASK_DEBUG=1 flask run --host 0.0.0.0 --port 8757
run-dev: | build-dev
# bash -c "trap 'docker-compose -f dc.dev.yml down' EXIT; MAX_COMMAND=\"flask run --host 0.0.0.0 --port 8000\" docker-compose -f dc.dev.yml up --build"
MAX_COMMAND="flask run --host 0.0.0.0 --port 8000" docker-compose -f dc.dev.yml up
run-dev-as-prod:
mkdir -p log
FLASK_APP=max.app LOG_DIR=log gunicorn -w 1 -b 0.0.0.0:8757 max.app:app
run-bash: | build-dev
MAX_COMMAND="sleep infinity" docker-compose -f dc.dev.yml up -d
docker-compose -f dc.dev.yml exec max "./entrypoint-dev.sh"
docker-compose -f dc.dev.yml exec max chown -R $$(id -u $${USER}):$$(id -g $${USER}) /app
docker-compose -f dc.dev.yml exec -u $$(id -u $${USER}):$$(id -g $${USER}) max bash || true
docker-compose -f dc.dev.yml down
run-bash-root: | build-dev
MAX_COMMAND="sleep infinity" docker-compose -f dc.dev.yml up -d
docker-compose -f dc.dev.yml exec max "./entrypoint-dev.sh"
docker-compose -f dc.dev.yml exec max bash || true
docker-compose -f dc.dev.yml down
stop-dev:
docker-compose -f dc.dev.yml down
run-cleanup: | build-dev
docker run -ti -v `pwd`/max:/app/max --entrypoint="" max-dev ./cleanup.sh
run-cleanup:
scripts/dev/cleanup.sh
# PROD
build-prod:
docker build -t max:$(shell cat VERSION) .