mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Detach storybook from the frontend build process
This commit is contained in:
20
docker/images/Dockerfile.storybook
Normal file
20
docker/images/Dockerfile.storybook
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM nginxinc/nginx-unprivileged:1.29.1
|
||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
||||
|
||||
USER root
|
||||
|
||||
RUN set -ex; \
|
||||
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot;
|
||||
|
||||
ARG BUNDLE_PATH="./bundle-frontend/storybook-static/"
|
||||
COPY $BUNDLE_PATH /var/www/
|
||||
COPY ./files/nginx.storybook.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN chown -R 1001:0 /var/cache/nginx; \
|
||||
chmod -R g+w /var/cache/nginx; \
|
||||
chown -R 1001:0 /etc/nginx; \
|
||||
chmod -R g+w /etc/nginx; \
|
||||
chown -R 1001:0 /var/www; \
|
||||
chmod -R g+w /var/www;
|
||||
|
||||
USER penpot:penpot
|
||||
27
docker/images/nginx.storybook.conf
Normal file
27
docker/images/nginx.storybook.conf
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user