Skip to content

Commit ebe50cf

Browse files
committed
docker things + extras
1 parent fa10a41 commit ebe50cf

File tree

17 files changed

+313
-153
lines changed

17 files changed

+313
-153
lines changed

.github/workflows/docker-publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docker Publish
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
release:
7+
types: [ published ]
8+
9+
jobs:
10+
build-and-push-image:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
- name: Log in to the Container registry
21+
uses: docker/login-action@v1
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Build and push Docker image
28+
uses: docker/build-push-action@v2
29+
with:
30+
context: .
31+
push: true
32+
tags: |
33+
ghcr.io/${{ github.repository }}:latest
34+
ghcr.io/${{ github.repository }}:${{ github.sha }}
35+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ backend/defs/secrets.edn
5555
*-lock.json
5656
*.jar
5757
!backend/extras/rabbit-kit-outliers/rabbit-kit-outliers.jar
58+
/rvbbit-*
59+
.zprint*

.zprintrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.zprintrc2

Lines changed: 0 additions & 11 deletions
This file was deleted.

Dockerfile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
##FROM openjdk:17-jre-slim
2+
FROM eclipse-temurin:17-jre-jammy
3+
4+
# Install additional packages
5+
RUN apt-get update && apt-get install -y \
6+
curl \
7+
wget \
8+
exiftool \
9+
npm \
10+
nodejs \
11+
imagemagick \
12+
golang-go \
13+
procps \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
WORKDIR /app
17+
COPY backend/rvbbit.jar .
18+
COPY backend/defs ./defs
19+
COPY backend/connections ./connections
20+
COPY backend/assets ./assets
21+
COPY backend/resources ./resources
22+
COPY backend/data ./data
23+
RUN mkdir ./db
24+
COPY backend/flows ./flows
25+
COPY backend/extras ./extras
26+
COPY backend/screens ./screens
27+
COPY backend/user.clj ./user.clj
28+
29+
RUN rm -rf ./assets/data-exports \
30+
&& rm -rf ./data/atoms \
31+
&& rm -rf ./defs/backup \
32+
&& rm -rf ./extras/node-colorthief/node_modules \
33+
&& rm -f ./extras/node-colorthief/package-lock.json
34+
35+
RUN mkdir ./data/atoms
36+
RUN mkdir ./assets/data-exports
37+
RUN mkdir ./shell-root
38+
39+
# # Specify the command to run your application
40+
# CMD ["java", "-jar", "rvbbit.jar"]
41+
42+
# Create a startup script
43+
RUN echo '#!/bin/sh' > /start.sh && \
44+
echo 'echo "Running additional startup commands..."' >> /start.sh && \
45+
echo 'go install github.com/danielmiessler/fabric@latest' >> /start.sh && \
46+
echo 'cd extras/node-colorthief ; npm install ; cd ../..' >> /start.sh && \
47+
echo 'echo "Starting RVBBIT..."' >> /start.sh && \
48+
echo 'exec java -jar rvbbit.jar' >> /start.sh && \
49+
chmod +x /start.sh
50+
51+
# Use the startup script as the entry point
52+
ENTRYPOINT ["/start.sh"]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,4 @@ Besides the built-in runners of SQL queries and Views (UI) - the combination of
275275
- Several features I had previously tweeted about and are 80% done (mostly working), but were pulled to make my (self-imposed) deadline, will def surface them discussion for priorities as well
276276

277277

278+
Copyright © 2024 Ryan Robitaille

backend/defs/config.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
:modes [:rowset]
3434
:hop-bar? false
3535
:ext ".edn"
36-
:icon "images/sql.png"} ;; basic clover-sql query runner
36+
:icon "images/sql.png "} ;; basic clover-sql query runner
3737

3838
:views {:default []
3939
:modes [:clover :edn :data]

backend/flows/openai-image-gen-ladder.edn

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,31 @@
810810
:types {:x :any, :out :any},
811811
:expandable? true,
812812
:drag-meta {:type :open-fn}}}},
813+
:open-fn-4
814+
{:y 1125,
815+
:fn (fn [x] x),
816+
:w 150,
817+
:raw-fn (fn [x] (str "Bearer " :settings/openai-api-key)),
818+
:right-click? true,
819+
:icon "zmdi-functions",
820+
:types nil,
821+
:z 0,
822+
:ports {:in {:x :any}, :out {:out :any}},
823+
:inputs nil,
824+
:h 60,
825+
:x 1675,
826+
:data
827+
{:flow-item
828+
{:category ":rabbit-base",
829+
:fn (fn [x] x),
830+
:name ":open-fn",
831+
:raw-fn (fn [x] x),
832+
:type :open-fn,
833+
:icon "zmdi-functions",
834+
:types {:x :any, :out :any},
835+
:inputs [:x],
836+
:expandable? true,
837+
:drag-meta {:type :open-fn}}}},
813838
:relative-url-path-for-png-version
814839
{:y 2825,
815840
:fn (fn [x] (get-in x [10 0 2])),
@@ -871,16 +896,19 @@
871896
:description ["Request map for the HTTP call. Headers, Method, URL, and the call body map."],
872897
:w 175,
873898
:right-click? true,
899+
:types nil,
874900
:z 0,
875-
:ports {:in {:req-body* :any}, :out {:headers :map, :method :keyword, :url :string, :body :map, :* :map}},
901+
:ports
902+
{:in {:apikey* :any, :req-body* :any},
903+
:out {:out {:headers :map, :method :keyword, :url :string, :body :keyword, :* :map}}},
904+
:inputs nil,
876905
:h 60,
877906
:x 1850,
878907
:data
879908
{:drag-meta {:type :open-block},
880909
:flow-item {:expandable? true, :meta {}},
881910
:user-input
882-
{:headers
883-
{"Authorization" "Bearer WAT!", "Content-Type" "application/json"},
911+
{:headers {"Authorization" :apikey*, "Content-Type" "application/json"},
884912
:method :post,
885913
:url "https://api.openai.com/v1/images/generations",
886914
:body :req-body*}}},
@@ -1016,7 +1044,7 @@
10161044
{:expandable? true,
10171045
:meta {:* {:scrubber {:message "OpenAI image gen style selector - DALLE3", :values ["vivid" "natural"]}}}},
10181046
:user-input "vivid"}}},
1019-
:zoom [154.5 -248.51 0.445],
1047+
:zoom [-1087.26 -804.94 1.25],
10201048
:opts {:close-on-done? true, :retry-on-error? true, :timeout 120000, :retries 404, :overrides {:style-param "vivid"}},
10211049
:flow-id "openai-image-gen-ladder",
10221050
:flowmaps-connections
@@ -1067,4 +1095,6 @@
10671095
[:open-fn-2 :shell-command-2/command]
10681096
[:shell-command-2 :abs-file-base-path/x]
10691097
[:abs-file-base-path :generate-file-path/base-dir]
1070-
[:abs-file-base-path :create-png-path/base-dir]]}
1098+
[:abs-file-base-path :create-png-path/base-dir]
1099+
[:size-param :open-fn-4/x]
1100+
[:open-fn-4 :http-req-map/apikey*]]}

backend/project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
[org.clojure/math.combinatorics "0.1.6"]
4040
;[hikari-cp "3.0.1"] ;; https://github.com/tomekw/hikari-cp
4141
[hikari-cp "3.1.0"] ;; https://github.com/tomekw/hikari-cp
42-
[net.clojars.wkok/openai-clojure "0.11.1"]
42+
;; [net.clojars.wkok/openai-clojure "0.11.1"]
4343
;[clj-http "3.12.3"]
4444
[clj-http "3.13.0"]
4545
[cheshire "5.11.0"]

0 commit comments

Comments
 (0)