Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6dc6dd6b8 |
No files matched your search
@@ -9,7 +9,8 @@
|
|||||||
"Bash(PYTHONPATH=. uv run *)",
|
"Bash(PYTHONPATH=. uv run *)",
|
||||||
"Bash(python *)",
|
"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(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 *)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-2
@@ -18,8 +18,9 @@ RUN uv sync --no-dev
|
|||||||
|
|
||||||
# Copy the application.
|
# Copy the application.
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN chmod +x entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
# Default: run the API server. docker-compose overrides this to also seed.
|
# Seeds perms/roles/superuser (idempotent, no-op if already present), then runs the API server.
|
||||||
CMD ["uv", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
@@ -28,10 +28,6 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
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:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
@@ -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
|
||||||
Reference in new issue
Block a user