diff --git a/Dockerfile b/Dockerfile index a77a6ab..a4ac2e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM python:3.13-alpine3.23 as builder +FROM python:3.13-alpine3.23 AS builder ENV UV_SYSTEM_PYTHON=1 COPY pyproject.toml . -RUN pip install uv && uv pip install -r pyproject.toml +RUN pip install uv && uv pip install -r pyproject.toml && pip uninstall -y uv FROM python:3.13-alpine3.23 @@ -13,8 +13,8 @@ WORKDIR /code ARG user=apps ARG uid=1001 ARG gid=1001 -RUN groupadd -g ${gid} ${user} -RUN useradd -u ${uid} -g ${user} -s /bin/sh -m ${user} + +RUN addgroup -S ${user} && adduser -S ${user} -G ${user} -u ${uid} -s /bin/sh RUN apk update && apk add gcc gettext vim libpq-dev RUN chown -R ${user}:${user} /code diff --git a/pyproject.toml b/pyproject.toml index 98a13bb..8ea1268 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "gonk==0.6.1", "ipython==8.16.1", "Pillow==11.0.0", - "psycopg2-binary==2.9.10", + "psycopg==3.3.3", "pyDes==2.0.1", "redis==4.5.4", "requests==2.32.4", diff --git a/scripts/run.sh b/scripts/run.sh index fd00072..2ddc367 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -9,9 +9,9 @@ RUN_SERVER=${RUN_SERVER:="FALSE"} RUN_CELERY=${RUN_CELERY:="FALSE"} if [ $RUN_SERVER = "TRUE" ]; then - uvicorn --workers $ASGI_WORKERS --host $ASGI_HOST --port $ASGI_PORT config.asgi:application + python -m uvicorn --workers $ASGI_WORKERS --host $ASGI_HOST --port $ASGI_PORT config.asgi:application elif [ $RUN_CELERY = "TRUE" ]; then - celery -A config worker + python -m celery -A config worker else echo "You have to set RUN_CELERY or RUN_SERVER to TRUE" echo "Exiting"