mirror of
https://github.com/penpot/penpot.git
synced 2025-01-04 13:50:12 -05:00
✨ Add minor adaptations for gitpod config and docker files.
This commit is contained in:
parent
43e75401d7
commit
f4f51dbf6b
4 changed files with 79 additions and 43 deletions
71
.gitpod.yml
71
.gitpod.yml
|
@ -5,72 +5,93 @@ ports:
|
||||||
# nginx
|
# nginx
|
||||||
- port: 3449
|
- port: 3449
|
||||||
onOpen: open-preview
|
onOpen: open-preview
|
||||||
|
|
||||||
# frontend nREPL
|
# frontend nREPL
|
||||||
- port: 3447
|
- port: 3447
|
||||||
onOpen: ignore
|
onOpen: ignore
|
||||||
visibility: private
|
visibility: private
|
||||||
|
|
||||||
# frontend shadow server
|
# frontend shadow server
|
||||||
- port: 3448
|
- port: 3448
|
||||||
onOpen: notify
|
onOpen: ignore
|
||||||
visibility: private
|
visibility: private
|
||||||
|
|
||||||
|
# backend
|
||||||
- port: 6060
|
- port: 6060
|
||||||
- port: 9090
|
onOpen: ignore
|
||||||
|
|
||||||
# exporter shadow server
|
# exporter shadow server
|
||||||
- port: 9630
|
- port: 9630
|
||||||
onOpen: notify
|
onOpen: ignore
|
||||||
visibility: private
|
visibility: private
|
||||||
|
|
||||||
# exporter http server
|
# exporter http server
|
||||||
- port: 6061
|
- port: 6061
|
||||||
onOpen: ignore
|
onOpen: ignore
|
||||||
|
|
||||||
# mailhog web interface
|
# mailhog web interface
|
||||||
- port: 8025
|
- port: 8025
|
||||||
onOpen: notify
|
onOpen: ignore
|
||||||
|
|
||||||
# mailhog postfix
|
# mailhog postfix
|
||||||
- port: 1025
|
- port: 1025
|
||||||
onOpen: ignore
|
onOpen: ignore
|
||||||
|
|
||||||
# postgres
|
# postgres
|
||||||
- port: 5432
|
- port: 5432
|
||||||
onOpen: ignore
|
onOpen: ignore
|
||||||
|
|
||||||
# redis
|
# redis
|
||||||
- port: 6379
|
- port: 6379
|
||||||
onOpen: ignore
|
onOpen: ignore
|
||||||
|
|
||||||
# openldap
|
# openldap
|
||||||
- port: 389
|
- port: 389
|
||||||
onOpen: ignore
|
onOpen: ignore
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# https://github.com/gitpod-io/gitpod/issues/666#issuecomment-534347856
|
# https://github.com/gitpod-io/gitpod/issues/666#issuecomment-534347856
|
||||||
- before: >
|
- name: gulp
|
||||||
|
command: >
|
||||||
|
cd $GITPOD_REPO_ROOT/frontend/;
|
||||||
|
yarn && gp sync-done 'frontend-yarn';
|
||||||
|
npx gulp --theme=${PENPOT_THEME} watch
|
||||||
|
|
||||||
|
- name: frontend shadow watch
|
||||||
|
command: >
|
||||||
|
cd $GITPOD_REPO_ROOT/frontend/;
|
||||||
|
gp sync-await 'frontend-yarn';
|
||||||
|
npx shadow-cljs watch main
|
||||||
|
|
||||||
|
- init: gp await-port 5432 && psql -f $GITPOD_REPO_ROOT/docker/gitpod/files/postgresql_init.sql
|
||||||
|
name: backend
|
||||||
|
command: >
|
||||||
|
cd $GITPOD_REPO_ROOT/backend/;
|
||||||
|
./scripts/start-dev
|
||||||
|
|
||||||
|
- name: exporter shadow watch
|
||||||
|
command:
|
||||||
|
cd $GITPOD_REPO_ROOT/exporter/;
|
||||||
|
gp sync-await 'frontend-yarn';
|
||||||
|
yarn && npx shadow-cljs watch main
|
||||||
|
|
||||||
|
- name: exporter web server
|
||||||
|
command: >
|
||||||
|
cd $GITPOD_REPO_ROOT/exporter/;
|
||||||
|
./scripts/wait-and-start.sh
|
||||||
|
|
||||||
|
- name: signed terminal
|
||||||
|
before: >
|
||||||
[[ ! -z ${GNUGPG} ]] &&
|
[[ ! -z ${GNUGPG} ]] &&
|
||||||
cd ~ &&
|
cd ~ &&
|
||||||
rm -rf .gnupg &&
|
rm -rf .gnupg &&
|
||||||
echo ${GNUGPG} | base64 -d | tar --no-same-owner -xzvf -
|
echo ${GNUGPG} | base64 -d | tar --no-same-owner -xzvf -
|
||||||
name: signed terminal
|
|
||||||
init: >
|
init: >
|
||||||
[[ ! -z ${GNUGPG_KEY} ]] &&
|
[[ ! -z ${GNUGPG_KEY} ]] &&
|
||||||
git config --global commit.gpgsign true &&
|
git config --global commit.gpgsign true &&
|
||||||
git config --global user.signingkey ${GNUGPG_KEY}
|
git config --global user.signingkey ${GNUGPG_KEY}
|
||||||
command: cd $GITPOD_REPO_ROOT
|
command: cd $GITPOD_REPO_ROOT
|
||||||
|
|
||||||
- init: yarn --cwd $GITPOD_REPO_ROOT/frontend/ install
|
|
||||||
name: frontend shadow watch
|
|
||||||
command: cd $GITPOD_REPO_ROOT/frontend/ && npx -y shadow-cljs watch main
|
|
||||||
|
|
||||||
- init: yarn --cwd $GITPOD_REPO_ROOT/exporter/ install
|
|
||||||
name: exporter shadow watch
|
|
||||||
command: gp await-port 3448 && cd $GITPOD_REPO_ROOT/exporter/ && npx -y shadow-cljs watch main
|
|
||||||
|
|
||||||
- name: exporter web server
|
|
||||||
openMode: split-right
|
|
||||||
command: gp await-port 9630 && cd $GITPOD_REPO_ROOT/exporter/ && ./scripts/wait-and-start.sh
|
|
||||||
|
|
||||||
- init: gp await-port 5432 && psql -f $GITPOD_REPO_ROOT/docker/gitpod/files/postgresql_init.sql
|
|
||||||
name: backend
|
|
||||||
command: cd $GITPOD_REPO_ROOT/backend/ && ./scripts/start-dev
|
|
||||||
|
|
||||||
- name: gulp
|
|
||||||
command: gp await-port 3448 && cd $GITPOD_REPO_ROOT/frontend/ && npx -y gulp --theme=${PENPOT_THEME} watch
|
|
||||||
|
|
||||||
- name: redis
|
- name: redis
|
||||||
command: redis-server
|
command: redis-server
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@ COPY docker/gitpod/files/nginx.conf /etc/nginx/nginx.conf
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ENV CLOJURE_VERSION=1.10.3.814 \
|
ENV CLOJURE_VERSION=1.10.3.814 \
|
||||||
CLJKONDO_VERSION=2021.03.03 \
|
CLJKONDO_VERSION=2021.03.22 \
|
||||||
|
BABASHKA_VERSION=0.3.1 \
|
||||||
LANG=en_US.UTF-8 \
|
LANG=en_US.UTF-8 \
|
||||||
LC_ALL=en_US.UTF-8
|
LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ RUN set -ex; \
|
||||||
libxi6 \
|
libxi6 \
|
||||||
libxrandr2 \
|
libxrandr2 \
|
||||||
libxrender1 \
|
libxrender1 \
|
||||||
|
libxshmfence1 \
|
||||||
libxss1 \
|
libxss1 \
|
||||||
libxtst6 \
|
libxtst6 \
|
||||||
fonts-liberation \
|
fonts-liberation \
|
||||||
|
@ -69,21 +71,39 @@ RUN set -ex; \
|
||||||
rm -rf /var/lib/apt/lists/*;
|
rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
wget "https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh"; \
|
curl -LfsSo /tmp/openjdk.tar.gz https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz; \
|
||||||
chmod +x "linux-install-$CLOJURE_VERSION.sh"; \
|
mkdir -p /usr/lib/jvm/openjdk16; \
|
||||||
"./linux-install-$CLOJURE_VERSION.sh"; \
|
cd /usr/lib/jvm/openjdk16; \
|
||||||
rm -rf "linux-install-$CLOJURE_VERSION.sh"
|
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
|
||||||
|
rm -rf /tmp/openjdk.tar.gz;
|
||||||
|
|
||||||
|
# Install clojure cli
|
||||||
|
RUN set -ex; \
|
||||||
|
curl -LfsSo /tmp/clojure.sh https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh; \
|
||||||
|
chmod +x /tmp/clojure.sh; \
|
||||||
|
/tmp/clojure.sh; \
|
||||||
|
rm -rf /tmp/clojure.sh;
|
||||||
|
|
||||||
|
# Install clj-kondo
|
||||||
|
RUN set -ex; \
|
||||||
|
curl -LfsSo /tmp/clj-kondo.zip https://github.com/borkdude/clj-kondo/releases/download/v$CLJKONDO_VERSION/clj-kondo-$CLJKONDO_VERSION-linux-amd64.zip; \
|
||||||
|
cd /usr/local/bin; \
|
||||||
|
unzip /tmp/clj-kondo.zip; \
|
||||||
|
rm /tmp/clj-kondo.zip;
|
||||||
|
|
||||||
|
# Install babashka
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
cd /tmp; \
|
cd /tmp; \
|
||||||
wget "https://github.com/borkdude/clj-kondo/releases/download/v${CLJKONDO_VERSION}/clj-kondo-${CLJKONDO_VERSION}-linux-amd64.zip"; \
|
curl -LfsSo /tmp/babashka.tar.gz https://github.com/babashka/babashka/releases/download/v$BABASHKA_VERSION/babashka-$BABASHKA_VERSION-linux-amd64.tar.gz; \
|
||||||
unzip "clj-kondo-${CLJKONDO_VERSION}-linux-amd64.zip"; \
|
cd /usr/local/bin; \
|
||||||
sudo mv clj-kondo /usr/local/bin/; \
|
tar -xf /tmp/babashka.tar.gz; \
|
||||||
rm "clj-kondo-${CLJKONDO_VERSION}-linux-amd64.zip";
|
rm -rf /tmp/babashka.tar.gz;
|
||||||
|
|
||||||
USER gitpod
|
USER gitpod
|
||||||
|
|
||||||
ENV PENPOT_SMTP_ENABLED=true \
|
ENV PATH="/usr/lib/jvm/openjdk16/bin:/usr/local/nodejs/bin:$PATH" \
|
||||||
|
JAVA_HOME=/usr/lib/jvm/openjdk16 \
|
||||||
|
PENPOT_SMTP_ENABLED=true \
|
||||||
PENPOT_SMTP_HOST=localhost \
|
PENPOT_SMTP_HOST=localhost \
|
||||||
PENPOT_SMTP_PORT=1025 \
|
PENPOT_SMTP_PORT=1025 \
|
||||||
PENPOT_SMTP_USER= \
|
PENPOT_SMTP_USER= \
|
||||||
|
@ -92,12 +112,6 @@ ENV PENPOT_SMTP_ENABLED=true \
|
||||||
PENPOT_SMTP_TLS=false \
|
PENPOT_SMTP_TLS=false \
|
||||||
PENPOT_SMTP_DEFAULT_REPLY_TO=no-reply@example.com \
|
PENPOT_SMTP_DEFAULT_REPLY_TO=no-reply@example.com \
|
||||||
PENPOT_SMTP_DEFAULT_FROM=no-reply@example.com \
|
PENPOT_SMTP_DEFAULT_FROM=no-reply@example.com \
|
||||||
PENPOT_SMTP_ENABLED=true \
|
PENPOT_DATABASE_URI="postgresql://localhost/penpot"
|
||||||
PENPOT_SMTP_HOST=localhost \
|
|
||||||
PENPOT_SMTP_PORT=1025 \
|
|
||||||
PENPOT_SMTP_USER= \
|
|
||||||
PENPOT_SMTP_PASSWORD= \
|
|
||||||
PENPOT_SMTP_SSL=false \
|
|
||||||
PENPOT_SMTP_TLS=false
|
|
||||||
|
|
||||||
# TODO Retrieve OpenLDAP from rroemhild/docker-test-openldap
|
# TODO Retrieve OpenLDAP from rroemhild/docker-test-openldap
|
||||||
|
|
|
@ -97,7 +97,7 @@ http {
|
||||||
|
|
||||||
location /internal/assets {
|
location /internal/assets {
|
||||||
internal;
|
internal;
|
||||||
alias $gitpod_repo_root/backend/resources/public/assets;
|
alias $gitpod_repo_root/backend/assets;
|
||||||
add_header x-internal-redirect "$upstream_http_x_accel_redirect";
|
add_header x-internal-redirect "$upstream_http_x_accel_redirect";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
bb -i '(babashka.wait/wait-for-port "localhost" 9630)';
|
bb -i '(babashka.wait/wait-for-port "localhost" 9630)';
|
||||||
bb -i '(babashka.wait/wait-for-path "target/app.js")';
|
bb -i '(babashka.wait/wait-for-path "target/app.js")';
|
||||||
|
sleep 2;
|
||||||
node target/app.js
|
node target/app.js
|
||||||
|
|
Loading…
Reference in a new issue