Compare commits

..
2 Commits
Author SHA1 Message Date
Ian Roddis b5529e0dc5 Exposing data path to support sqlite volume maps 2026-07-20 11:00:00 -04:00
Ian Roddis b6dc6dd6b8 Adding entrypoint to seed database 2026-07-17 17:03:35 -03:00
5 changed files with 16 additions and 7 deletions

No files matched your search

+2 -1
View File
@@ -9,7 +9,8 @@
"Bash(PYTHONPATH=. uv run *)",
"Bash(python *)",
"Bash(DATABASE_URL=\"sqlite+aiosqlite:////tmp/claude-1000/-home-iroddis-dev-armament-fitguide/41e5e14d-88fe-45e7-ba3a-be5a2cbde2cd/scratchpad/mig_test.db\" uv run alembic upgrade head)",
"Bash(sqlite3 /tmp/claude-1000/-home-iroddis-dev-armament-fitguide/41e5e14d-88fe-45e7-ba3a-be5a2cbde2cd/scratchpad/mig_test.db '.schema users')"
"Bash(sqlite3 /tmp/claude-1000/-home-iroddis-dev-armament-fitguide/41e5e14d-88fe-45e7-ba3a-be5a2cbde2cd/scratchpad/mig_test.db '.schema users')",
"Bash(docker build *)"
]
}
}
+5 -2
View File
@@ -18,8 +18,11 @@ RUN uv sync --no-dev
# Copy the application.
COPY . .
RUN chmod +x entrypoint.sh
# If sqlite3 is used
VOLUME /data
EXPOSE 8000
# Default: run the API server. docker-compose overrides this to also seed.
CMD ["uv", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
# Seeds perms/roles/superuser (idempotent, no-op if already present), then runs the API server.
ENTRYPOINT ["./entrypoint.sh"]
+2
View File
@@ -30,6 +30,8 @@ clean:
docker:
mkdir -p artifacts
docker build -t $(IMAGE_NAME):$(VERSION) .
docker-push: docker
docker tag $(IMAGE_NAME):$(VERSION) $(IMAGE_NAME):latest
docker tag $(IMAGE_NAME):$(VERSION) git.kinesin.ca/kinesin/$(IMAGE_NAME):$(VERSION)
docker tag $(IMAGE_NAME):$(VERSION) git.kinesin.ca/kinesin/$(IMAGE_NAME):latest
-4
View File
@@ -28,10 +28,6 @@ services:
depends_on:
db:
condition: service_healthy
# Seed default roles/permissions/superuser, then start the server.
command: >
sh -c "uv run python -m scripts.seed &&
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000"
volumes:
pgdata:
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
# Idempotent: creates perms/roles/superuser only if missing.
uv run python -m scripts.seed
exec uv run uvicorn app.main:app --host 0.0.0.0 --port 8000