2021-11-03 13:06:46 +01:00
|
|
|
#!/usr/bin/env bash
|
2019-12-09 16:29:26 +01:00
|
|
|
|
2022-04-04 10:52:50 +02:00
|
|
|
export PENPOT_HOST=devenv
|
|
|
|
export PENPOT_TENANT=dev
|
2023-03-16 19:36:18 +01:00
|
|
|
export PENPOT_FLAGS="\
|
|
|
|
$PENPOT_FLAGS \
|
|
|
|
enable-prepl-server \
|
|
|
|
enable-urepl-server \
|
2023-11-09 18:32:37 +01:00
|
|
|
enable-nrepl-server \
|
2023-03-16 19:36:18 +01:00
|
|
|
enable-webhooks \
|
|
|
|
enable-backend-asserts \
|
|
|
|
enable-audit-log \
|
|
|
|
enable-transit-readable-response \
|
|
|
|
enable-demo-users \
|
|
|
|
enable-fdata-storage-pointer-map \
|
|
|
|
enable-fdata-storage-objets-map \
|
|
|
|
disable-secure-session-cookies \
|
|
|
|
enable-smtp \
|
2023-09-26 14:54:10 +02:00
|
|
|
enable-access-tokens \
|
|
|
|
disable-file-validation";
|
2021-01-29 11:00:54 +01:00
|
|
|
|
2023-11-09 18:32:37 +01:00
|
|
|
# Initialize MINIO config
|
|
|
|
mc alias set penpot-s3/ http://minio:9000 minioadmin minioadmin
|
|
|
|
mc admin user add penpot-s3 penpot-devenv penpot-devenv
|
|
|
|
mc admin policy attach penpot-s3 readwrite --user=penpot-devenv
|
|
|
|
mc mb penpot-s3/penpot -p
|
|
|
|
|
|
|
|
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
|
2019-12-09 16:29:26 +01:00
|
|
|
|
2021-10-20 11:18:28 +02:00
|
|
|
if [ "$1" = "--watch" ]; then
|
2023-11-09 18:32:37 +01:00
|
|
|
trap "exit" INT TERM ERR
|
|
|
|
trap "kill 0" EXIT
|
|
|
|
|
2021-10-20 11:18:28 +02:00
|
|
|
echo "Start Watch..."
|
|
|
|
|
|
|
|
clojure -A:dev -M -m app.main &
|
|
|
|
|
|
|
|
npx nodemon \
|
|
|
|
--watch src \
|
|
|
|
--watch ../common \
|
|
|
|
--ext "clj" \
|
|
|
|
--signal SIGKILL \
|
2023-11-09 18:32:37 +01:00
|
|
|
--exec 'echo "(app.main/stop)\n\r(repl/refresh)\n\r(app.main/start)\n" | nc -N localhost 6062'
|
|
|
|
|
|
|
|
wait;
|
2021-10-20 11:18:28 +02:00
|
|
|
|
|
|
|
else
|
2023-11-09 18:32:37 +01:00
|
|
|
clojure -A:dev -M -m app.main;
|
2021-10-20 11:18:28 +02:00
|
|
|
fi
|