From 1b81ddebb4a7f6fcf3c170870f20cfe94eca459e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Wed, 29 Oct 2025 11:11:32 +0100 Subject: [PATCH] :bug: Fix some paths and add missed nginx config file for the storybook docker image --- docker/images/Dockerfile.storybook | 2 +- docker/images/files/nginx.storybook.conf | 27 ++++++++++++++++++++++++ manage.sh | 4 ++-- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 docker/images/files/nginx.storybook.conf diff --git a/docker/images/Dockerfile.storybook b/docker/images/Dockerfile.storybook index 106f357060..24e6acc5cf 100644 --- a/docker/images/Dockerfile.storybook +++ b/docker/images/Dockerfile.storybook @@ -6,7 +6,7 @@ USER root RUN set -ex; \ useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; -ARG BUNDLE_PATH="./bundle-frontend/storybook-static/" +ARG BUNDLE_PATH="./bundle-storybook/" COPY $BUNDLE_PATH /var/www/ COPY ./files/nginx.storybook.conf /etc/nginx/conf.d/default.conf diff --git a/docker/images/files/nginx.storybook.conf b/docker/images/files/nginx.storybook.conf new file mode 100644 index 0000000000..efccfb5f95 --- /dev/null +++ b/docker/images/files/nginx.storybook.conf @@ -0,0 +1,27 @@ +server { + listen 8080 default_server; + server_name _; + + charset utf-8; + etag off; + + gzip on; + gzip_static on; + gzip_types text/plain text/css application/javascript application/json application/vnd.api+json application/xml application/x-javascript text/xml image/svg+xml; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_min_length 256; + gzip_vary on; + + error_log /dev/stderr; + access_log /dev/stdout; + + root /var/www; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +} diff --git a/manage.sh b/manage.sh index 7298b69d59..174276b7d8 100755 --- a/manage.sh +++ b/manage.sh @@ -310,11 +310,11 @@ function build-exporter-docker-image { } function build-storybook-docker-image { - rsync -avr --delete ./bundles/frontend/ ./docker/images/bundle-frontend/; + rsync -avr --delete ./bundles/storybook/ ./docker/images/bundle-storybook/; pushd ./docker/images; docker build \ -t penpotapp/storybook:$CURRENT_BRANCH -t penpotapp/storybook:latest \ - --build-arg BUNDLE_PATH="./bundle-frontend/storybook-static/" \ + --build-arg BUNDLE_PATH="./bundle-storybook/" \ -f Dockerfile.storybook .; popd; }