diff --git a/.gitignore b/.gitignore index b21e3adf..4a59f062 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ server/**/lib/ server/**/bin/ server/**/pyvenv.cfg __pycache__/ + +.vscode +docker-compose.dev.yml diff --git a/client/Dockerfile b/client/Dockerfile index ea5151fa..7dbad250 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,3 +1,4 @@ +ARG BUILDPLATFORM=linux/amd64 FROM --platform=$BUILDPLATFORM node:lts as builder WORKDIR /opt/app diff --git a/server/Dockerfile b/server/Dockerfile index 47b30b25..39c4bb95 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,5 +1,5 @@ ARG ALPINE_VERSION=3.13 - +ARG BUILDPLATFORM=linux/amd64 FROM alpine:$ALPINE_VERSION as prereqs WORKDIR /opt/app @@ -26,7 +26,6 @@ RUN apk --no-cache add \ py3-pyrfc3339 RUN pip3 install --no-cache-dir --disable-pip-version-check \ "alembic>=0.8.5" \ - "alembic_utils>=0.5.6" \ "coloredlogs==5.0" \ "pyheif==0.6.1" \ "heif-image-plugin>=0.3.2" \ @@ -34,8 +33,7 @@ RUN pip3 install --no-cache-dir --disable-pip-version-check \ "pillow-avif-plugin~=1.1.0" RUN apk --no-cache del py3-pip -COPY ./ /opt/app/ -RUN rm -rf /opt/app/szurubooru/tests + FROM --platform=$BUILDPLATFORM prereqs as testing @@ -74,8 +72,12 @@ RUN apk --no-cache add \ py3-waitress \ && mkdir -p /opt/app /data \ && addgroup -g ${PGID} app \ - && adduser -SDH -h /opt/app -g '' -G app -u ${PUID} app \ - && chown -R app:app /opt/app /data + && adduser -SDH -h /opt/app -g '' -G app -u ${PUID} app + + +COPY ./ /opt/app/ + +RUN chown -R app:app /opt/app /data USER app CMD ["/opt/app/docker-start.sh"] diff --git a/server/requirements.txt b/server/requirements.txt index 1eabef8a..ffe18f0c 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -13,4 +13,3 @@ pytz>=2018.3 pyyaml>=3.11 SQLAlchemy>=1.0.12, <1.4 yt-dlp -alembic_utils>=0.5.6 diff --git a/server/szurubooru/migrations/env.py b/server/szurubooru/migrations/env.py index 6b155888..32a02deb 100644 --- a/server/szurubooru/migrations/env.py +++ b/server/szurubooru/migrations/env.py @@ -11,7 +11,7 @@ import sys from time import sleep import alembic -from alembic_utils.replaceable_entity import register_entities +#from alembic_utils.replaceable_entity import register_entities import sqlalchemy as sa @@ -23,8 +23,8 @@ sys.path.append(os.path.join(dir_to_self, *[os.pardir] * 2)) import szurubooru.config # noqa: E402 import szurubooru.model.base # noqa: E402 -from szurubooru.migrations.functions import get_pool_posts_around # noqa: E402 -register_entities([get_pool_posts_around]) +#from szurubooru.migrations.functions import get_pool_posts_around # noqa: E402 +#register_entities([get_pool_posts_around]) # fmt: on