2020-08-17 06:39:36 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-04-04 03:52:50 -05:00
|
|
|
export PENPOT_HOST=devenv
|
|
|
|
export PENPOT_TENANT=dev
|
2023-01-13 08:15:53 -05:00
|
|
|
export PENPOT_FLAGS="\
|
|
|
|
$PENPOT_FLAGS \
|
2024-03-19 05:21:16 -05:00
|
|
|
enable-login-with-ldap \
|
2023-04-25 06:25:13 -05:00
|
|
|
enable-login-with-password
|
|
|
|
enable-login-with-oidc \
|
|
|
|
enable-login-with-google \
|
|
|
|
enable-login-with-github \
|
|
|
|
enable-login-with-gitlab \
|
2023-11-21 08:34:03 -05:00
|
|
|
enable-backend-worker \
|
2023-01-13 08:15:53 -05:00
|
|
|
enable-backend-asserts \
|
2023-10-23 12:31:41 -05:00
|
|
|
enable-feature-fdata-pointer-map \
|
|
|
|
enable-feature-fdata-objects-map \
|
2023-01-13 08:15:53 -05:00
|
|
|
enable-audit-log \
|
|
|
|
enable-transit-readable-response \
|
|
|
|
enable-demo-users \
|
|
|
|
disable-secure-session-cookies \
|
|
|
|
enable-smtp \
|
2023-01-18 11:12:33 -05:00
|
|
|
enable-prepl-server \
|
|
|
|
enable-urepl-server \
|
|
|
|
enable-rpc-climit \
|
|
|
|
enable-rpc-rlimit \
|
2024-10-03 08:56:53 -05:00
|
|
|
enable-quotes \
|
2023-01-18 11:12:33 -05:00
|
|
|
enable-soft-rpc-rlimit \
|
2024-09-04 05:02:58 -05:00
|
|
|
enable-auto-file-snapshot \
|
2023-01-13 08:15:53 -05:00
|
|
|
enable-webhooks \
|
2023-09-26 07:54:10 -05:00
|
|
|
enable-access-tokens \
|
2024-08-01 09:17:22 -05:00
|
|
|
enable-tiered-file-data-storage \
|
2023-11-23 08:00:39 -05:00
|
|
|
enable-file-validation \
|
2024-03-19 05:21:16 -05:00
|
|
|
enable-file-schema-validation";
|
2022-04-04 03:52:50 -05:00
|
|
|
|
2024-04-10 02:47:59 -05:00
|
|
|
# Default deletion delay for devenv
|
|
|
|
export PENPOT_DELETION_DELAY="24h"
|
2024-01-10 07:44:00 -05:00
|
|
|
|
|
|
|
# Setup default upload media file size to 100MiB
|
|
|
|
export PENPOT_MEDIA_MAX_FILE_SIZE=104857600
|
|
|
|
|
2024-02-19 08:28:39 -05:00
|
|
|
# Setup default multipart upload size to 300MiB
|
|
|
|
export PENPOT_HTTP_SERVER_MAX_MULTIPART_BODY_SIZE=314572800
|
|
|
|
|
2022-01-27 09:00:42 -05:00
|
|
|
# export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot"
|
|
|
|
# export PENPOT_DATABASE_USERNAME="penpot"
|
|
|
|
# export PENPOT_DATABASE_PASSWORD="penpot"
|
|
|
|
# export PENPOT_DATABASE_READONLY=true
|
|
|
|
|
|
|
|
# export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot_pre"
|
|
|
|
# export PENPOT_DATABASE_USERNAME="penpot_pre"
|
|
|
|
# export PENPOT_DATABASE_PASSWORD="penpot_pre"
|
2021-01-29 05:00:54 -05:00
|
|
|
|
2022-04-01 06:23:06 -05:00
|
|
|
# export PENPOT_LOGGERS_LOKI_URI="http://172.17.0.1:3100/loki/api/v1/push"
|
|
|
|
# export PENPOT_AUDIT_LOG_ARCHIVE_URI="http://localhost:6070/api/audit"
|
|
|
|
|
2022-02-12 06:14:55 -05:00
|
|
|
# Initialize MINIO config
|
2023-11-28 11:20:28 -05:00
|
|
|
mc alias set penpot-s3/ http://minio:9000 minioadmin minioadmin -q
|
|
|
|
mc admin user add penpot-s3 penpot-devenv penpot-devenv -q
|
2023-12-04 05:13:52 -05:00
|
|
|
mc admin user info penpot-s3 penpot-devenv |grep -F -q "readwrite"
|
2023-11-28 11:20:28 -05:00
|
|
|
if [ "$?" = "1" ]; then
|
|
|
|
mc admin policy attach penpot-s3 readwrite --user=penpot-devenv -q
|
|
|
|
fi
|
|
|
|
mc mb penpot-s3/penpot -p -q
|
2022-04-01 06:23:06 -05:00
|
|
|
|
2022-03-07 05:05:29 -05:00
|
|
|
export AWS_ACCESS_KEY_ID=penpot-devenv
|
|
|
|
export AWS_SECRET_ACCESS_KEY=penpot-devenv
|
2024-08-01 09:17:22 -05:00
|
|
|
|
|
|
|
export PENPOT_OBJECTS_STORAGE_BACKEND=s3
|
|
|
|
export PENPOT_OBJECTS_STORAGE_S3_ENDPOINT=http://minio:9000
|
|
|
|
export PENPOT_OBJECTS_STORAGE_S3_BUCKET=penpot
|
2024-10-25 09:12:09 -05:00
|
|
|
export PENPOT_OBJECTS_STORAGE_FS_DIRECTORY="assets"
|
2022-02-12 06:14:55 -05:00
|
|
|
|
2021-12-22 05:33:53 -05:00
|
|
|
export OPTIONS="
|
2022-11-02 03:30:08 -05:00
|
|
|
-A:jmx-remote -A:dev \
|
2021-12-22 05:33:53 -05:00
|
|
|
-J-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager \
|
2023-01-13 08:15:53 -05:00
|
|
|
-J-Djdk.attach.allowAttachSelf \
|
2023-10-20 06:48:03 -05:00
|
|
|
-J-Dpolyglot.engine.WarnInterpreterOnly=false \
|
2024-02-14 09:16:05 -05:00
|
|
|
-J-Dlog4j2.configurationFile=log4j2-devenv-repl.xml \
|
2023-10-20 06:48:03 -05:00
|
|
|
-J-XX:+EnableDynamicAgentLoading \
|
2021-12-22 05:33:53 -05:00
|
|
|
-J-XX:-OmitStackTraceInFastThrow \
|
2022-01-12 14:23:25 -05:00
|
|
|
-J-XX:+UnlockDiagnosticVMOptions \
|
2023-02-20 06:44:35 -05:00
|
|
|
-J-XX:+DebugNonSafepoints \
|
2023-10-20 06:48:03 -05:00
|
|
|
-J-Djdk.tracePinnedThreads=full"
|
|
|
|
|
|
|
|
# Enable preview
|
|
|
|
export OPTIONS="$OPTIONS -J--enable-preview"
|
2022-01-12 14:23:25 -05:00
|
|
|
|
2023-03-02 11:00:49 -05:00
|
|
|
# Setup HEAP
|
2023-12-04 13:25:11 -05:00
|
|
|
# export OPTIONS="$OPTIONS -J-Xms50m -J-Xmx1024m"
|
2023-03-02 11:00:49 -05:00
|
|
|
# export OPTIONS="$OPTIONS -J-Xms1100m -J-Xmx1100m -J-XX:+AlwaysPreTouch"
|
|
|
|
|
|
|
|
# Increase virtual thread pool size
|
|
|
|
# export OPTIONS="$OPTIONS -J-Djdk.virtualThreadScheduler.parallelism=16"
|
|
|
|
|
|
|
|
# Disable C2 Compiler
|
|
|
|
# export OPTIONS="$OPTIONS -J-XX:TieredStopAtLevel=1"
|
|
|
|
|
|
|
|
# Disable all compilers
|
|
|
|
# export OPTIONS="$OPTIONS -J-Xint"
|
|
|
|
|
|
|
|
# Setup GC
|
2023-12-04 13:25:11 -05:00
|
|
|
# export OPTIONS="$OPTIONS -J-XX:+UseG1GC"
|
2023-03-02 11:00:49 -05:00
|
|
|
|
|
|
|
# Setup GC
|
|
|
|
# export OPTIONS="$OPTIONS -J-XX:+UseZGC"
|
|
|
|
|
|
|
|
# Enable ImageMagick v7.x support
|
2022-06-14 04:07:10 -05:00
|
|
|
# export OPTIONS="-J-Dim4java.useV7=true $OPTIONS";
|
|
|
|
|
2021-02-15 07:14:05 -05:00
|
|
|
export OPTIONS_EVAL="nil"
|
|
|
|
# export OPTIONS_EVAL="(set! *warn-on-reflection* true)"
|
|
|
|
|
2021-01-29 05:00:54 -05:00
|
|
|
set -ex
|
2021-02-15 07:14:05 -05:00
|
|
|
exec clojure $OPTIONS -M -e "$OPTIONS_EVAL" -m rebel-readline.main
|