mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 15:51:37 -05:00
Merge pull request #2874 from penpot/niwinz-hotfix-1
🐛 Fix docker images issues in the latest release
This commit is contained in:
commit
8758723200
6 changed files with 44 additions and 92 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
|
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 update; \
|
||||||
|
apt-get -qq upgrade; \
|
||||||
apt-get -qqy --no-install-recommends install \
|
apt-get -qqy --no-install-recommends install \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
tzdata \
|
||||||
binutils \
|
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/*;
|
rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
|
@ -39,49 +59,6 @@ RUN set -eux; \
|
||||||
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
|
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
|
||||||
rm -rf /tmp/openjdk.tar.gz;
|
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/
|
COPY --chown=penpot:penpot ./bundle-backend/ /opt/penpot/backend/
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,13 @@ set -x
|
||||||
DOCKER_CLI_EXPERIMENTAL=enabled
|
DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
ORG=${PENPOT_DOCKER_NAMESPACE:-penpotapp};
|
ORG=${PENPOT_DOCKER_NAMESPACE:-penpotapp};
|
||||||
PLATFORM=${PENPOT_BUILD_PLATFORM:-linux/amd64};
|
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";
|
DOCKER_IMAGE="$ORG/$IMAGE";
|
||||||
OPTIONS="-t $DOCKER_IMAGE:$PENPOT_BUILD_VERSION";
|
OPTIONS="-t $DOCKER_IMAGE:$VERSION";
|
||||||
|
|
||||||
IFS=", "
|
IFS=", "
|
||||||
read -a TAGS <<< $PENPOT_BUILD_TAGS;
|
read -a TAGS <<< $PENPOT_BUILD_TAGS;
|
||||||
|
@ -16,10 +19,6 @@ for element in "${TAGS[@]}"; do
|
||||||
OPTIONS="$OPTIONS -t $DOCKER_IMAGE:$element";
|
OPTIONS="$OPTIONS -t $DOCKER_IMAGE:$element";
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$PENPOT_BUILD_PUSH" = "true" ]; then
|
|
||||||
OPTIONS="--push $OPTIONS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker buildx inspect penpot > /dev/null 2>&1;
|
docker buildx inspect penpot > /dev/null 2>&1;
|
||||||
docker run --privileged --rm tonistiigi/binfmt --install all
|
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||||
|
|
||||||
|
@ -32,4 +31,5 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset IFS;
|
unset IFS;
|
||||||
|
|
||||||
docker buildx build --platform ${PLATFORM// /,} $OPTIONS -f Dockerfile.$IMAGE "$@" .;
|
docker buildx build --platform ${PLATFORM// /,} $OPTIONS -f Dockerfile.$IMAGE "$@" .;
|
||||||
|
|
|
@ -260,40 +260,6 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "1080:1080"
|
- "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
|
## 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.
|
## have preference, then just use filesystem, this is here just for the completeness.
|
||||||
|
|
||||||
|
|
|
@ -426,8 +426,8 @@
|
||||||
(rx/ignore)))))
|
(rx/ignore)))))
|
||||||
|
|
||||||
(defn update-team-photo
|
(defn update-team-photo
|
||||||
[{:keys [file] :as params}]
|
[file]
|
||||||
(us/assert! ::di/file file)
|
(us/assert! ::di/blob file)
|
||||||
(ptk/reify ::update-team-photo
|
(ptk/reify ::update-team-photo
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
|
|
|
@ -200,3 +200,12 @@
|
||||||
:body (http/form-data params)})
|
:body (http/form-data params)})
|
||||||
(rx/map http/conditional-decode-transit)
|
(rx/map http/conditional-decode-transit)
|
||||||
(rx/mapcat handle-response)))
|
(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
|
on-file-selected
|
||||||
(fn [file]
|
(fn [file]
|
||||||
(st/emit! (dd/update-team-photo {:file file})))]
|
(st/emit! (dd/update-team-photo file)))]
|
||||||
|
|
||||||
|
|
||||||
(mf/use-effect
|
(mf/use-effect
|
||||||
|
|
Loading…
Add table
Reference in a new issue