Compare commits

..

2 Commits
0.2.0 ... 1.0.1

Author SHA1 Message Date
4f50f6bb7e fix: fixed issue with the uvicorn worker command 2024-10-10 17:59:38 +02:00
a43ec6abd8 breaking: release 1.0.0 2024-10-10 17:39:13 +02:00
2 changed files with 55 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN pip install 'uvicorn[standard]'
EXPOSE 9000
CMD ["uvicorn", "app.main:app", "-w", "6" , "--host", "0.0.0.0", "--port", "9000"]
CMD ["uvicorn", "app.main:app", "--workers", "6" , "--host", "0.0.0.0", "--port", "9000"]
# Install curl
RUN apt-get update && apt-get install -y curl && apt-get clean

View File

@@ -0,0 +1,54 @@
"""empty message
Revision ID: 74c576cf9560
Revises: 95201f00f6b9
Create Date: 2024-10-10 17:38:19.834168
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "74c576cf9560"
down_revision: Union[str, None] = "95201f00f6b9"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.create_table(
"logentry",
sa.Column("application", sa.UUID(), nullable=False),
sa.Column(
"l_type",
sa.Enum("INFO", "WARNING", "ERROR", "CRITICAL", name="logtype"),
nullable=False,
),
sa.Column(
"t_type",
sa.Enum("CREATE", "UPDATE", "DELETE", "UNDEFINED", name="transactiontype"),
nullable=False,
),
sa.Column("message", sa.String(length=512), nullable=True),
sa.Column("author", sa.String(length=512), nullable=False),
sa.Column("object_reference", sa.String(length=512), nullable=True),
sa.Column("previous_object", sa.JSON(), nullable=True),
sa.Column("id", sa.UUID(), nullable=False),
sa.Column(
"created_at", sa.DateTime(timezone=True), server_default=sa.text("now()"), nullable=True
),
sa.Column("updated_at", sa.DateTime(), nullable=True),
sa.Column("created_by_id", sa.String(), nullable=True),
sa.ForeignKeyConstraint(
["application"], ["application.id"], ondelete="CASCADE", name="fk_logentry_application"
),
sa.PrimaryKeyConstraint("id", name="pk_logentry"),
)
def downgrade() -> None:
op.drop_table("logentry")