From 59a45530a8e4a504f6142f0765fe193fc2db7aab Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 30 Mar 2021 14:52:42 +0200 Subject: [PATCH] :whale: Add babashka to devenv. Among other changes. --- docker/devenv/Dockerfile | 24 +++++++++++++++++------- docker/devenv/docker-compose.yaml | 4 ---- docker/devenv/files/nginx.conf | 4 ++++ docker/devenv/files/postgresql_init.sql | 1 + 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/docker/devenv/Dockerfile b/docker/devenv/Dockerfile index db151af6a..f888c480c 100644 --- a/docker/devenv/Dockerfile +++ b/docker/devenv/Dockerfile @@ -5,7 +5,8 @@ ARG DEBIAN_FRONTEND=noninteractive ENV NODE_VERSION=v14.16.0 \ CLOJURE_VERSION=1.10.3.814 \ - CLJKONDO_VERSION=2021.03.03 \ + CLJKONDO_VERSION=2021.03.22 \ + BABASHKA_VERSION=0.3.0 \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 @@ -26,6 +27,7 @@ RUN set -ex; \ git \ rlwrap \ unzip \ + fakeroot \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen; \ @@ -115,8 +117,6 @@ RUN set -ex; \ apt-get -qqy install postgresql-client-13; \ rm -rf /var/lib/apt/lists/*; -WORKDIR /home - RUN set -ex; \ curl -LfsSo /tmp/nodejs.tar.xz https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.xz; \ mkdir -p /usr/local/nodejs; \ @@ -128,12 +128,22 @@ RUN set -ex; \ /usr/local/nodejs/bin/npm install -g svgo; \ rm -rf /tmp/nodejs.tar.xz; +# 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; \ cd /tmp; \ - wget https://github.com/borkdude/clj-kondo/releases/download/v$CLJKONDO_VERSION/clj-kondo-$CLJKONDO_VERSION-linux-amd64.zip; \ - unzip clj-kondo-$CLJKONDO_VERSION-linux-amd64.zip; \ - mv clj-kondo /usr/local/bin/; \ - rm 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; \ + cd /usr/local/bin; \ + tar -xf /tmp/babashka.tar.gz; \ + rm -rf /tmp/babashka.tar.gz; + +WORKDIR /home EXPOSE 3447 EXPOSE 3448 diff --git a/docker/devenv/docker-compose.yaml b/docker/devenv/docker-compose.yaml index 22c506b2c..536b019c5 100644 --- a/docker/devenv/docker-compose.yaml +++ b/docker/devenv/docker-compose.yaml @@ -38,10 +38,6 @@ services: - 9090:9090 environment: - - PENPOT_DATABASE_URI=postgresql://postgres/penpot - - PENPOT_DATABASE_USERNAME=penpot - - PENPOT_DATABASE_PASSWORD=penpot - - PENPOT_REDIS_URI=redis://redis/0 - EXTERNAL_UID=${CURRENT_USER_ID} # STMP setup - PENPOT_SMTP_ENABLED=true diff --git a/docker/devenv/files/nginx.conf b/docker/devenv/files/nginx.conf index a4b13cb73..2ce3f8316 100644 --- a/docker/devenv/files/nginx.conf +++ b/docker/devenv/files/nginx.conf @@ -111,6 +111,10 @@ http { proxy_pass http://127.0.0.1:6061; } + location /telemetry { + proxy_pass http://127.0.0.1:6070/inbox; + } + location /playground { alias /home/penpot/penpot/experiments/; add_header Cache-Control "no-cache, max-age=0"; diff --git a/docker/devenv/files/postgresql_init.sql b/docker/devenv/files/postgresql_init.sql index 3f174e897..c36960e25 100644 --- a/docker/devenv/files/postgresql_init.sql +++ b/docker/devenv/files/postgresql_init.sql @@ -1 +1,2 @@ CREATE DATABASE penpot_test; +CREATE DATABASE penpot_telemetry;