mirror of
https://github.com/penpot/penpot.git
synced 2025-03-10 23:01:39 -05:00
Merge branch 'staging'
This commit is contained in:
commit
7ab91f68af
7 changed files with 48 additions and 96 deletions
|
@ -1,15 +1,35 @@
|
|||
FROM ubuntu:22.04 as jre-build
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
LABEL maintainer="Andrey Antukh <niwi@niwi.nz>"
|
||||
ENV LANG='en_US.UTF-8' \
|
||||
LC_ALL='en_US.UTF-8' \
|
||||
JAVA_HOME="/opt/jdk" \
|
||||
PATH=/opt/jdk/bin:$PATH \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
TZ=Etc/UTC
|
||||
|
||||
RUN set -eux; \
|
||||
RUN set -ex; \
|
||||
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qq upgrade; \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
curl \
|
||||
ca-certificates \
|
||||
binutils \
|
||||
curl \
|
||||
tzdata \
|
||||
locales \
|
||||
ca-certificates \
|
||||
imagemagick \
|
||||
webp \
|
||||
rlwrap \
|
||||
fontconfig \
|
||||
woff-tools \
|
||||
woff2 \
|
||||
python3 \
|
||||
fontforge \
|
||||
; \
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
|
||||
locale-gen; \
|
||||
mkdir -p /opt/penpot/assets; \
|
||||
chown -R penpot:penpot /opt/penpot; \
|
||||
rm -rf /var/lib/apt/lists/*;
|
||||
|
||||
RUN set -eux; \
|
||||
|
@ -39,49 +59,6 @@ RUN set -eux; \
|
|||
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
|
||||
rm -rf /tmp/openjdk.tar.gz;
|
||||
|
||||
RUN /opt/jdk/bin/jlink \
|
||||
--verbose \
|
||||
--module-path /opt/jdk/jmods \
|
||||
--strip-debug \
|
||||
--no-man-pages \
|
||||
--no-header-files \
|
||||
--compress 0 \
|
||||
--add-modules java.base,java.naming,java.xml,java.logging,java.net.http,java.sql,java.management,java.desktop,jdk.jfr,jdk.unsupported,jdk.management.jfr \
|
||||
--output /opt/jre
|
||||
|
||||
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="Andrey Antukh <niwi@niwi.nz>"
|
||||
ENV LANG='en_US.UTF-8' \
|
||||
LC_ALL='en_US.UTF-8' \
|
||||
JAVA_HOME="/opt/jre" \
|
||||
PATH=/opt/jre/bin:$PATH \
|
||||
TZ=Etc/UTC
|
||||
|
||||
COPY --from=jre-build /opt/jre /opt/jre
|
||||
|
||||
RUN set -ex; \
|
||||
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
|
||||
apt-get -qq update; \
|
||||
apt-get -qqy --no-install-recommends install \
|
||||
curl \
|
||||
tzdata \
|
||||
locales \
|
||||
ca-certificates \
|
||||
imagemagick \
|
||||
webp \
|
||||
fontconfig \
|
||||
woff-tools \
|
||||
woff2 \
|
||||
python3 \
|
||||
fontforge \
|
||||
; \
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
|
||||
locale-gen; \
|
||||
mkdir -p /opt/penpot/assets; \
|
||||
chown -R penpot:penpot /opt/penpot; \
|
||||
rm -rf /var/lib/apt/lists/*;
|
||||
|
||||
COPY --chown=penpot:penpot ./bundle-backend/ /opt/penpot/backend/
|
||||
|
||||
|
|
|
@ -4,10 +4,13 @@ set -x
|
|||
DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
ORG=${PENPOT_DOCKER_NAMESPACE:-penpotapp};
|
||||
PLATFORM=${PENPOT_BUILD_PLATFORM:-linux/amd64};
|
||||
IMAGE=${1:-backend};
|
||||
|
||||
IMAGE=${PENPOT_BUILD_IMAGE:-backend}
|
||||
PLATFORM=${PENPOT_BUILD_PLATFORM:-linux/amd64};
|
||||
VERSION=${PENPOT_BUILD_VERSION:-latest}
|
||||
|
||||
DOCKER_IMAGE="$ORG/$IMAGE";
|
||||
OPTIONS="-t $DOCKER_IMAGE:$PENPOT_BUILD_VERSION";
|
||||
OPTIONS="-t $DOCKER_IMAGE:$VERSION";
|
||||
|
||||
IFS=", "
|
||||
read -a TAGS <<< $PENPOT_BUILD_TAGS;
|
||||
|
@ -16,10 +19,6 @@ for element in "${TAGS[@]}"; do
|
|||
OPTIONS="$OPTIONS -t $DOCKER_IMAGE:$element";
|
||||
done
|
||||
|
||||
if [ "$PENPOT_BUILD_PUSH" = "true" ]; then
|
||||
OPTIONS="--push $OPTIONS"
|
||||
fi
|
||||
|
||||
docker buildx inspect penpot > /dev/null 2>&1;
|
||||
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
|
||||
|
@ -32,4 +31,5 @@ else
|
|||
fi
|
||||
|
||||
unset IFS;
|
||||
|
||||
docker buildx build --platform ${PLATFORM// /,} $OPTIONS -f Dockerfile.$IMAGE "$@" .;
|
||||
|
|
|
@ -134,7 +134,7 @@ services:
|
|||
## environment variables for the backend here:
|
||||
## https://help.penpot.app/technical-guide/configuration/#advanced-configuration
|
||||
|
||||
- PENPOT_FLAGS=enable-registration enable-login disable-email-verification enable-smtp enable-prepl-server
|
||||
- PENPOT_FLAGS=enable-registration enable-login-with-password disable-email-verification enable-smtp enable-prepl-server
|
||||
|
||||
## Penpot SECRET KEY. It serves as a master key from which other keys for subsystems
|
||||
## (eg http sessions) are derived.
|
||||
|
@ -260,40 +260,6 @@ services:
|
|||
ports:
|
||||
- "1080:1080"
|
||||
|
||||
## An optional admin application for pentpot. It allows manage users, teams and inspect
|
||||
## some parts of the database. You can read more about it on:
|
||||
## https://github.com/penpot/penpot-admin
|
||||
##
|
||||
## If you are going to use admin, ensure to have `enable-prepl-server` in backend flags
|
||||
## and uncomment the `PENPOT_PREPL_HOST` environment variable.
|
||||
##
|
||||
## Status: EXPERIMENTAL
|
||||
|
||||
# penpot-admin:
|
||||
# image: "penpotapp/admin:latest"
|
||||
# networks:
|
||||
# - penpot
|
||||
#
|
||||
# depends_on:
|
||||
# - penpot-postgres
|
||||
# - penpot-backend
|
||||
#
|
||||
# environment:
|
||||
# ## Adjust to the same value as on backend
|
||||
# - PENPOT_PUBLIC_URI=http://localhost:9001
|
||||
#
|
||||
# ## Do not touch it, this is an internal routes
|
||||
# - PENPOT_API_URI=http://penpot-frontend/
|
||||
# - PENPOT_PREPL_URI=tcp://penpot-backend:6063/
|
||||
# - PENPOT_DEBUG="false"
|
||||
#
|
||||
# ## Adjust to the same values as on backend
|
||||
# - PENPOT_DATABASE_HOST=penpot-postgres
|
||||
# - PENPOT_DATABASE_NAME=penpot
|
||||
# - PENPOT_DATABASE_USERNAME=penpot
|
||||
# - PENPOT_DATABASE_PASSWORD=penpot
|
||||
# - PENPOT_REDIS_URI=redis://penpot-redis/0
|
||||
|
||||
## Example configuration of MiniIO (S3 compatible object storage service); If you don't
|
||||
## have preference, then just use filesystem, this is here just for the completeness.
|
||||
|
||||
|
|
|
@ -102,9 +102,9 @@ http {
|
|||
proxy_pass http://penpot-backend:6060/api;
|
||||
}
|
||||
|
||||
location /admin {
|
||||
proxy_pass http://penpot-admin:6065/admin;
|
||||
}
|
||||
# location /admin {
|
||||
# proxy_pass http://penpot-admin:6065/admin;
|
||||
# }
|
||||
|
||||
location /ws/notifications {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
|
|
@ -426,8 +426,8 @@
|
|||
(rx/ignore)))))
|
||||
|
||||
(defn update-team-photo
|
||||
[{:keys [file] :as params}]
|
||||
(us/assert! ::di/file file)
|
||||
[file]
|
||||
(us/assert! ::di/blob file)
|
||||
(ptk/reify ::update-team-photo
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
|
|
@ -200,3 +200,12 @@
|
|||
:body (http/form-data params)})
|
||||
(rx/map http/conditional-decode-transit)
|
||||
(rx/mapcat handle-response)))
|
||||
|
||||
(defmethod command ::multipart-upload
|
||||
[id params]
|
||||
(->> (http/send! {:method :post
|
||||
:uri (u/join @cf/public-uri "api/rpc/command/" (name id))
|
||||
:credentials "include"
|
||||
:body (http/form-data params)})
|
||||
(rx/map http/conditional-decode-transit)
|
||||
(rx/mapcat handle-response)))
|
||||
|
|
|
@ -888,7 +888,7 @@
|
|||
|
||||
on-file-selected
|
||||
(fn [file]
|
||||
(st/emit! (dd/update-team-photo {:file file})))]
|
||||
(st/emit! (dd/update-team-photo file)))]
|
||||
|
||||
|
||||
(mf/use-effect
|
||||
|
|
Loading…
Add table
Reference in a new issue