From: Victor Accarini Date: Thu, 26 Dec 2024 13:53:03 +0000 (-0300) Subject: chore: fix docker compose files for macos X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3cf15d9509be382a8ee87c910a055c1c32ec009;p=thirdparty%2Fpatchwork.git chore: fix docker compose files for macos --- diff --git a/docker-compose-pg.yml b/docker-compose-pg.yml index 44bc3ec0..25cf8ff7 100644 --- a/docker-compose-pg.yml +++ b/docker-compose-pg.yml @@ -9,6 +9,7 @@ services: - POSTGRES_USER=patchwork - POSTGRES_PASSWORD=password web: + platform: linux/amd64 build: context: . dockerfile: ./tools/docker/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 73f080a4..61c61865 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,7 @@ services: # https://stackoverflow.com/a/55706057 - SYS_NICE # CAP_SYS_NICE web: + platform: linux/amd64 build: context: . dockerfile: ./tools/docker/Dockerfile diff --git a/docs/development/installation.rst b/docs/development/installation.rst index c33f768b..521df51e 100644 --- a/docs/development/installation.rst +++ b/docs/development/installation.rst @@ -30,6 +30,10 @@ configure Patchwork using Docker: package. __ post-install_ + .. note:: + + Mac users might need to enable Rosetta emulation in the docker engine. + #. (Optional) Create a ``.env`` file in the root directory of the project and store your ``UID`` and ``GID`` attribute there. diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 0a55b54d..6d942492 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED 1 ENV PROJECT_HOME /home/patchwork/patchwork ENV DJANGO_SETTINGS_MODULE patchwork.settings.dev -RUN groupadd --gid=$GID patchwork && \ +RUN groupadd -o --gid=$GID patchwork && \ useradd --uid=$UID --gid=$GID --create-home patchwork RUN rm -f /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime