From f1085aadd1df566e3bc8654fbce62390909d04c8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 6 Feb 2023 19:21:55 +0100 Subject: [PATCH] :bug: Fix compatibility issues on docker upgrade path --- docker/images/Dockerfile.backend | 4 +++- docker/images/docker-compose.yaml | 4 ++-- docker/images/files/nginx.conf | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/images/Dockerfile.backend b/docker/images/Dockerfile.backend index be6cdaa75..7b6a4ee5b 100644 --- a/docker/images/Dockerfile.backend +++ b/docker/images/Dockerfile.backend @@ -28,8 +28,10 @@ RUN set -ex; \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen; \ - mkdir -p /opt/penpot/assets; \ + mkdir -p /opt/data; \ + mkdir -p /opt/penpot; \ chown -R penpot:penpot /opt/penpot; \ + chown -R penpot:penpot /opt/data; \ rm -rf /var/lib/apt/lists/*; RUN set -eux; \ diff --git a/docker/images/docker-compose.yaml b/docker/images/docker-compose.yaml index 6302178cd..975b08dd7 100644 --- a/docker/images/docker-compose.yaml +++ b/docker/images/docker-compose.yaml @@ -40,7 +40,7 @@ services: - 9001:80 volumes: - - penpot_assets:/opt/penpot/assets + - penpot_assets:/opt/data/assets depends_on: - penpot-backend @@ -180,7 +180,7 @@ services: ## stored in a docker volume. - PENPOT_ASSETS_STORAGE_BACKEND=assets-fs - - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/penpot/assets + - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets ## Also can be configured to to use a S3 compatible storage ## service like MiniIO. Look below for minio service setup. diff --git a/docker/images/files/nginx.conf b/docker/images/files/nginx.conf index f628aacfe..a43f3bf66 100644 --- a/docker/images/files/nginx.conf +++ b/docker/images/files/nginx.conf @@ -90,7 +90,7 @@ http { location /internal/assets { internal; - alias /opt/penpot/assets; + alias /opt/data/assets; add_header x-internal-redirect "$upstream_http_x_accel_redirect"; }