mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
61 lines
1.7 KiB
Bash
Executable file
61 lines
1.7 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
export PENPOT_HOST=devenv
|
|
export PENPOT_TENANT=dev
|
|
export PENPOT_FLAGS="\
|
|
$PENPOT_FLAGS \
|
|
enable-prepl-server \
|
|
enable-urepl-server \
|
|
enable-nrepl-server \
|
|
enable-webhooks \
|
|
enable-backend-asserts \
|
|
enable-audit-log \
|
|
enable-transit-readable-response \
|
|
enable-demo-users \
|
|
enable-feature-fdata-pointer-map \
|
|
enable-feature-fdata-objects-map \
|
|
disable-secure-session-cookies \
|
|
enable-smtp \
|
|
enable-access-tokens \
|
|
disable-feature-components-v2 \
|
|
enable-file-validation \
|
|
enable-file-schema-validation \
|
|
disable-soft-file-schema-validation \
|
|
disable-soft-file-validation";
|
|
|
|
|
|
# Initialize MINIO config
|
|
mc alias set penpot-s3/ http://minio:9000 minioadmin minioadmin -q
|
|
mc admin user add penpot-s3 penpot-devenv penpot-devenv -q
|
|
mc admin user info penpot-s3 penpot-devenv |grep -F -q "readwrite"
|
|
if [ "$?" = "1" ]; then
|
|
mc admin policy attach penpot-s3 readwrite --user=penpot-devenv -q
|
|
fi
|
|
mc mb penpot-s3/penpot -p -q
|
|
|
|
export AWS_ACCESS_KEY_ID=penpot-devenv
|
|
export AWS_SECRET_ACCESS_KEY=penpot-devenv
|
|
export PENPOT_ASSETS_STORAGE_BACKEND=assets-s3
|
|
export PENPOT_STORAGE_ASSETS_S3_ENDPOINT=http://minio:9000
|
|
export PENPOT_STORAGE_ASSETS_S3_BUCKET=penpot
|
|
|
|
if [ "$1" = "--watch" ]; then
|
|
trap "exit" INT TERM ERR
|
|
trap "kill 0" EXIT
|
|
|
|
echo "Start Watch..."
|
|
|
|
clojure -A:dev -M -m app.main &
|
|
|
|
npx nodemon \
|
|
--watch src \
|
|
--watch ../common \
|
|
--ext "clj" \
|
|
--signal SIGKILL \
|
|
--exec 'echo "(app.main/stop)\n\r(repl/refresh)\n\r(app.main/start)\n" | nc -N localhost 6062'
|
|
|
|
wait;
|
|
|
|
else
|
|
clojure -A:dev -M -m app.main;
|
|
fi
|