Spaces:
Runtime error
Runtime error
Greg Claude Sonnet 4.6 commited on
Commit ·
7ec15eb
1
Parent(s): 63ce0aa
fix(backend): wire entrypoint.sh in Dockerfile + replace LONGTEXT with Text
Browse filesTwo blockers found during Task 3.9 end-to-end verification:
1. Dockerfile CMD was calling uvicorn directly, bypassing entrypoint.sh
(no Postgres wait, no create_all, no seed). Fixed to CMD ["/app/entrypoint.sh"].
2. card_template.py still imported sqlalchemy.dialects.mysql.LONGTEXT, causing
UnsupportedCompilationError on PostgreSQL create_all. Replaced with sa.Text.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
backend/Dockerfile
CHANGED
|
@@ -16,6 +16,8 @@ RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
|
|
| 16 |
|
| 17 |
COPY . .
|
| 18 |
|
|
|
|
|
|
|
| 19 |
EXPOSE 8000
|
| 20 |
|
| 21 |
-
CMD ["
|
|
|
|
| 16 |
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
+
RUN chmod +x /app/entrypoint.sh
|
| 20 |
+
|
| 21 |
EXPOSE 8000
|
| 22 |
|
| 23 |
+
CMD ["/app/entrypoint.sh"]
|
backend/app/models/card_template.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
-
from sqlalchemy import Column, BigInteger, String, DateTime, func
|
| 2 |
-
from sqlalchemy.dialects.mysql import LONGTEXT
|
| 3 |
from app.core.database import Base
|
| 4 |
|
| 5 |
|
|
@@ -11,6 +10,6 @@ class CardTemplate(Base):
|
|
| 11 |
name = Column(String(100), nullable=False)
|
| 12 |
orientation = Column(String(20), nullable=False, default="landscape")
|
| 13 |
code_type = Column(String(20), nullable=False, default="qrcode")
|
| 14 |
-
canvas_json = Column(
|
| 15 |
created_at = Column(DateTime, server_default=func.now())
|
| 16 |
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
|
|
|
| 1 |
+
from sqlalchemy import Column, BigInteger, String, DateTime, Text, func
|
|
|
|
| 2 |
from app.core.database import Base
|
| 3 |
|
| 4 |
|
|
|
|
| 10 |
name = Column(String(100), nullable=False)
|
| 11 |
orientation = Column(String(20), nullable=False, default="landscape")
|
| 12 |
code_type = Column(String(20), nullable=False, default="qrcode")
|
| 13 |
+
canvas_json = Column(Text, nullable=False)
|
| 14 |
created_at = Column(DateTime, server_default=func.now())
|
| 15 |
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|