mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 14:56:12 +02:00
🚧 Improve build scripts.
This commit is contained in:
parent
b5c8afe69f
commit
94fe18b4ae
12 changed files with 649 additions and 449 deletions
2
backend/bin/kaocha
Executable file
2
backend/bin/kaocha
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
clojure -A:dev:test -m kaocha.runner "$@"
|
14
backend/bin/start
Executable file
14
backend/bin/start
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -e ~/local/.fixtures-loaded ]; then
|
||||||
|
echo "Loading fixtures..."
|
||||||
|
clojure -Adev -m uxbox.fixtures
|
||||||
|
touch ~/local/.fixtures-loaded
|
||||||
|
fi
|
||||||
|
|
||||||
|
clojure -J-XX:-OmitStackTraceInFastThrow -m uxbox.main
|
||||||
|
|
||||||
|
|
||||||
|
|
108
backend/deps.edn
108
backend/deps.edn
|
@ -1,64 +1,74 @@
|
||||||
{:deps {org.clojure/clojure {:mvn/version "1.10.1"}
|
{:deps
|
||||||
funcool/promesa {:mvn/version "5.0.0-SNAPSHOT"}
|
{org.clojure/clojure {:mvn/version "1.10.1"}
|
||||||
funcool/cuerdas {:mvn/version "2.2.1"}
|
funcool/promesa {:mvn/version "5.0.0-SNAPSHOT"}
|
||||||
|
funcool/cuerdas {:mvn/version "2.2.1"}
|
||||||
|
|
||||||
;; Logging
|
;; Logging
|
||||||
org.clojure/tools.logging {:mvn/version "0.5.0"}
|
org.clojure/tools.logging {:mvn/version "0.5.0"}
|
||||||
org.apache.logging.log4j/log4j-api {:mvn/version "2.12.1"}
|
org.apache.logging.log4j/log4j-api {:mvn/version "2.12.1"}
|
||||||
org.apache.logging.log4j/log4j-core {:mvn/version "2.12.1"}
|
org.apache.logging.log4j/log4j-core {:mvn/version "2.12.1"}
|
||||||
org.apache.logging.log4j/log4j-jul {:mvn/version "2.12.1"}
|
org.apache.logging.log4j/log4j-jul {:mvn/version "2.12.1"}
|
||||||
funcool/datoteka {:mvn/version "1.1.0"}
|
funcool/datoteka {:mvn/version "1.1.0"}
|
||||||
expound/expound {:mvn/version "0.7.2"}
|
expound/expound {:mvn/version "0.7.2"}
|
||||||
instaparse/instaparse {:mvn/version "1.4.10"}
|
instaparse/instaparse {:mvn/version "1.4.10"}
|
||||||
com.cognitect/transit-clj {:mvn/version "0.8.319"}
|
com.cognitect/transit-clj {:mvn/version "0.8.319"}
|
||||||
|
|
||||||
;; vertx deps
|
;; vertx deps
|
||||||
;; vertx-clojure/vertx {:mvn/version "0.0.0-SNAPSHOT"}
|
;; vertx-clojure/vertx {:mvn/version "0.0.0-SNAPSHOT"}
|
||||||
metosin/reitit-core {:mvn/version "0.3.10"}
|
metosin/reitit-core {:mvn/version "0.3.10"}
|
||||||
metosin/sieppari {:mvn/version "0.0.0-alpha8"}
|
metosin/sieppari {:mvn/version "0.0.0-alpha8"}
|
||||||
io.vertx/vertx-core {:mvn/version "3.8.4"}
|
io.vertx/vertx-core {:mvn/version "3.8.4"}
|
||||||
io.vertx/vertx-web {:mvn/version "3.8.4"}
|
io.vertx/vertx-web {:mvn/version "3.8.4"}
|
||||||
io.vertx/vertx-web-client {:mvn/version "3.8.4"}
|
io.vertx/vertx-web-client {:mvn/version "3.8.4"}
|
||||||
io.vertx/vertx-pg-client {:mvn/version "3.8.4"}
|
io.vertx/vertx-pg-client {:mvn/version "3.8.4"}
|
||||||
;; end verx deps
|
;; end verx deps
|
||||||
|
|
||||||
lambdaisland/uri {:mvn/version "1.1.0"}
|
lambdaisland/uri {:mvn/version "1.1.0"}
|
||||||
|
|
||||||
danlentz/clj-uuid {:mvn/version "0.1.9"}
|
danlentz/clj-uuid {:mvn/version "0.1.9"}
|
||||||
org.jsoup/jsoup {:mvn/version "1.12.1"}
|
org.jsoup/jsoup {:mvn/version "1.12.1"}
|
||||||
hiccup/hiccup {:mvn/version "1.0.5"}
|
hiccup/hiccup {:mvn/version "1.0.5"}
|
||||||
org.im4java/im4java {:mvn/version "1.4.0"}
|
org.im4java/im4java {:mvn/version "1.4.0"}
|
||||||
|
|
||||||
buddy/buddy-sign {:mvn/version "3.1.0"}
|
buddy/buddy-sign {:mvn/version "3.1.0"}
|
||||||
buddy/buddy-hashers {:mvn/version "1.4.0"}
|
buddy/buddy-hashers {:mvn/version "1.4.0"}
|
||||||
|
|
||||||
org.xerial.snappy/snappy-java {:mvn/version "1.1.7.3"}
|
org.xerial.snappy/snappy-java {:mvn/version "1.1.7.3"}
|
||||||
com.github.spullara.mustache.java/compiler {:mvn/version "0.9.6"}
|
com.github.spullara.mustache.java/compiler {:mvn/version "0.9.6"}
|
||||||
commons-io/commons-io {:mvn/version "2.6"}
|
commons-io/commons-io {:mvn/version "2.6"}
|
||||||
com.draines/postal {:mvn/version "2.0.3"
|
com.draines/postal {:mvn/version "2.0.3"
|
||||||
:exclusions [commons-codec/commons-codec]}
|
:exclusions [commons-codec/commons-codec]}
|
||||||
|
|
||||||
;; exception printing
|
;; exception printing
|
||||||
io.aviso/pretty {:mvn/version "0.1.37"}
|
io.aviso/pretty {:mvn/version "0.1.37"}
|
||||||
|
|
||||||
mount/mount {:mvn/version "0.1.16"}
|
mount/mount {:mvn/version "0.1.16"}
|
||||||
environ/environ {:mvn/version "1.1.0"}
|
environ/environ {:mvn/version "1.1.0"}}
|
||||||
}
|
|
||||||
:paths ["src" "vendor" "resources"]
|
:paths ["src" "vendor" "resources"]
|
||||||
:aliases
|
:aliases
|
||||||
{:dev
|
{:dev
|
||||||
{:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}
|
{:extra-deps
|
||||||
org.clojure/tools.namespace {:mvn/version "0.3.1"}
|
{com.bhauman/rebel-readline {:mvn/version "0.1.4"}
|
||||||
fipp/fipp {:mvn/version "0.6.21"}
|
org.clojure/tools.namespace {:mvn/version "0.3.1"}
|
||||||
criterium/criterium {:mvn/version "0.4.5"}
|
fipp/fipp {:mvn/version "0.6.21"}
|
||||||
mockery/mockery {:mvn/version "0.1.4"}
|
criterium/criterium {:mvn/version "0.4.5"}
|
||||||
}
|
mockery/mockery {:mvn/version "0.1.4"}}
|
||||||
:extra-paths ["test"]}
|
:extra-paths ["test"]}
|
||||||
:repl {:main-opts ["-m" "rebel-readline.main"]}
|
|
||||||
:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.6.0"}}
|
:repl
|
||||||
:main-opts ["-m" "nrepl.cmdline"]}
|
{:main-opts ["-m" "rebel-readline.main"]}
|
||||||
:ancient {:main-opts ["-m" "deps-ancient.deps-ancient"]
|
|
||||||
:extra-deps {deps-ancient {:mvn/version "RELEASE"}}}
|
:test
|
||||||
|
{:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-554"}}}
|
||||||
|
|
||||||
|
:nrepl
|
||||||
|
{:extra-deps {nrepl/nrepl {:mvn/version "0.6.0"}}
|
||||||
|
:main-opts ["-m" "nrepl.cmdline"]}
|
||||||
|
|
||||||
|
:ancient
|
||||||
|
{:main-opts ["-m" "deps-ancient.deps-ancient"]
|
||||||
|
:extra-deps {deps-ancient {:mvn/version "RELEASE"}}}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
5
backend/tests.edn
Normal file
5
backend/tests.edn
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#kaocha/v1
|
||||||
|
{:tests
|
||||||
|
[{:id :unit
|
||||||
|
:test-paths ["test" "src"]
|
||||||
|
:ns-patterns ["test-.*"]}]}
|
|
@ -49,6 +49,7 @@ services:
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12
|
image: postgres:12
|
||||||
|
# command: postgres -c config_file=/etc/postgresql.conf
|
||||||
hostname: 'uxbox-devenv-postgres'
|
hostname: 'uxbox-devenv-postgres'
|
||||||
container_name: 'uxbox-devenv-postgres'
|
container_name: 'uxbox-devenv-postgres'
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -61,4 +62,5 @@ services:
|
||||||
- POSTGRES_USER=uxbox
|
- POSTGRES_USER=uxbox
|
||||||
- POSTGRES_PASSWORD=uxbox
|
- POSTGRES_PASSWORD=uxbox
|
||||||
volumes:
|
volumes:
|
||||||
|
# - ./files/postgresql.conf:/etc/postgresql.conf
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -10,8 +10,7 @@ tmux send-keys -t uxbox 'clojure -Adev tools.clj figwheel' enter
|
||||||
tmux new-window -t uxbox:2 -n 'backend'
|
tmux new-window -t uxbox:2 -n 'backend'
|
||||||
tmux select-window -t uxbox:2
|
tmux select-window -t uxbox:2
|
||||||
tmux send-keys -t uxbox 'cd uxbox/backend' enter C-l
|
tmux send-keys -t uxbox 'cd uxbox/backend' enter C-l
|
||||||
# tmux send-keys -t uxbox 'clojure -Adev -m uxbox.fixtures' enter C-l
|
tmux send-keys -t uxbox './bin/start' enter
|
||||||
tmux send-keys -t uxbox 'clojure -Adev:repl' enter
|
|
||||||
|
|
||||||
tmux rename-window -t uxbox:0 'gulp'
|
tmux rename-window -t uxbox:0 'gulp'
|
||||||
tmux select-window -t uxbox:0
|
tmux select-window -t uxbox:0
|
||||||
|
|
|
@ -14,7 +14,7 @@ networks:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:11
|
image: postgres:12
|
||||||
restart: always
|
restart: always
|
||||||
stop_signal: SIGINT
|
stop_signal: SIGINT
|
||||||
ports:
|
ports:
|
||||||
|
@ -26,46 +26,51 @@ services:
|
||||||
- POSTGRES_PASSWORD=uxbox_postgres_password
|
- POSTGRES_PASSWORD=uxbox_postgres_password
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
# - /etc/localtime:/etc/localtime:ro
|
|
||||||
# - /etc/timezone:/etc/timezone:ro
|
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: uxbox-backend:latest
|
image: uxbox-backend:latest
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
- smtp
|
||||||
ports:
|
ports:
|
||||||
- 6060
|
- 6060
|
||||||
volumes:
|
volumes:
|
||||||
- backend_data:/srv/uxbox/data
|
- backend_data:/srv/uxbox/data
|
||||||
- backend_m2:/root/.m2
|
- backend_m2:/root/.m2
|
||||||
# - /etc/localtime:/etc/localtime:ro
|
|
||||||
# - /etc/timezone:/etc/timezone:ro
|
|
||||||
environment:
|
environment:
|
||||||
# HTTP setup
|
# HTTP setup
|
||||||
- UXBOX_HTTP_SERVER_DEBUG=false
|
|
||||||
- UXBOX_HTTP_SERVER_CORS=*
|
- UXBOX_HTTP_SERVER_CORS=*
|
||||||
|
|
||||||
|
# Media & Assets
|
||||||
- UXBOX_MEDIA_URI="/media/"
|
- UXBOX_MEDIA_URI="/media/"
|
||||||
- UXBOX_ASSETS_URI="/static/"
|
- UXBOX_ASSETS_URI="/static/"
|
||||||
- UXBOX_MEDIA_DIRECTORY="data/media"
|
- UXBOX_MEDIA_DIRECTORY="data/media"
|
||||||
- UXBOX_ASSETS_DIRECTORY="data/static"
|
- UXBOX_ASSETS_DIRECTORY="data/static"
|
||||||
# Database setup
|
|
||||||
- UXBOX_DATABASE_URI="jdbc:postgresql://postgres/uxbox"
|
# Database setup (using the `postgres` container)
|
||||||
|
- UXBOX_DATABASE_URI="postgresql://postgres/uxbox"
|
||||||
- UXBOX_DATABASE_USERNAME="uxbox"
|
- UXBOX_DATABASE_USERNAME="uxbox"
|
||||||
- UXBOX_DATABASE_PASSWORD="uxbox_postgres_password"
|
- UXBOX_DATABASE_PASSWORD="uxbox_postgres_password"
|
||||||
|
|
||||||
# Mail setup
|
# Mail setup
|
||||||
- UXBOX_EMAIL_REPLY_TO="no-reply@uxbox.io"
|
- UXBOX_EMAIL_REPLY_TO="no-reply@uxbox.io"
|
||||||
- UXBOX_EMAIL_FROM="no-reply@uxbox.io"
|
- UXBOX_EMAIL_FROM="no-reply@uxbox.io"
|
||||||
# STMP setup
|
|
||||||
- UXBOX_SMTP_HOST="localhost"
|
# STMP setup (using the `smtp` container)
|
||||||
|
- UXBOX_SMTP_HOST="smtp"
|
||||||
- UXBOX_SMTP_PORT=25
|
- UXBOX_SMTP_PORT=25
|
||||||
- UXBOX_SMTP_USER="uxbox"
|
- UXBOX_SMTP_USER="uxbox"
|
||||||
- UXBOX_SMTP_PASSWORD="youshouldoverwritethiswithsomethingelse"
|
# - UXBOX_SMTP_PASSWORD=""
|
||||||
- UXBOX_SMTP_SSL=false
|
- UXBOX_SMTP_SSL=false
|
||||||
- UXBOX_SMTP_TLS=false
|
- UXBOX_SMTP_TLS=false
|
||||||
- UXBOX_SMTP_ENABLED=false
|
- UXBOX_SMTP_ENABLED=false
|
||||||
# Security setup
|
|
||||||
- UXBOX_SECRET="foobar"
|
## Security setup
|
||||||
|
# Overwrite with a randomy generated string. Mainly used as
|
||||||
|
# shared key for sign cookies, tokens, etc.
|
||||||
|
- UXBOX_SECRET="the very secret string"
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: uxbox-frontend:latest
|
image: uxbox-frontend:latest
|
||||||
|
@ -76,8 +81,6 @@ services:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- backend_data:/srv/uxbox/
|
- backend_data:/srv/uxbox/
|
||||||
# - /etc/localtime:/etc/localtime:ro
|
|
||||||
# - /etc/timezone:/etc/timezone:ro
|
|
||||||
|
|
||||||
frontend-dev:
|
frontend-dev:
|
||||||
image: uxbox-frontend-dbg:latest
|
image: uxbox-frontend-dbg:latest
|
||||||
|
@ -88,6 +91,12 @@ services:
|
||||||
- 8081:8080
|
- 8081:8080
|
||||||
volumes:
|
volumes:
|
||||||
- backend_data:/srv/uxbox/
|
- backend_data:/srv/uxbox/
|
||||||
# - /etc/localtime:/etc/localtime:ro
|
|
||||||
# - /etc/timezone:/etc/timezone:ro
|
smtp:
|
||||||
|
image: mwader/postfix-relay
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTFIX_myhostname=smtp.uxbox.io
|
||||||
|
- OPENDKIM_DOMAINS=smtp.uxbox.io
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,39 @@
|
||||||
{:deps {org.clojure/clojurescript {:mvn/version "1.10.520"}
|
{:deps
|
||||||
org.clojure/clojure {:mvn/version "1.10.1"}
|
{org.clojure/clojurescript {:mvn/version "1.10.597"}
|
||||||
com.cognitect/transit-cljs {:mvn/version "0.8.256"}
|
org.clojure/clojure {:mvn/version "1.10.1"}
|
||||||
|
com.cognitect/transit-cljs {:mvn/version "0.8.256"}
|
||||||
|
|
||||||
cljsjs/react-dom-server {:mvn/version "16.9.0-0"}
|
cljsjs/react {:mvn/version "16.11.0-0"}
|
||||||
|
cljsjs/react-dom {:mvn/version "16.11.0-0"}
|
||||||
|
cljsjs/react-dom-server {:mvn/version "16.11.0-0"}
|
||||||
|
|
||||||
environ/environ {:mvn/version "1.1.0"}
|
environ/environ {:mvn/version "1.1.0"}
|
||||||
metosin/reitit-core {:mvn/version "0.3.10"}
|
metosin/reitit-core {:mvn/version "0.3.10"}
|
||||||
expound/expound {:mvn/version "0.7.2"}
|
expound/expound {:mvn/version "0.7.2"}
|
||||||
|
|
||||||
funcool/beicon {:mvn/version "5.1.0"}
|
funcool/beicon {:mvn/version "5.1.0"}
|
||||||
funcool/cuerdas {:mvn/version "2.2.0"}
|
funcool/cuerdas {:mvn/version "2.2.0"}
|
||||||
funcool/lentes {:mvn/version "1.3.3"}
|
funcool/lentes {:mvn/version "1.3.3"}
|
||||||
funcool/potok {:mvn/version "2.7.0"}
|
funcool/potok {:mvn/version "2.7.0"}
|
||||||
funcool/promesa {:mvn/version "4.0.2"}
|
funcool/promesa {:mvn/version "4.0.2"}
|
||||||
funcool/rumext {:mvn/version "2.0.0-SNAPSHOT"}
|
funcool/rumext {:mvn/version "2.0.0-SNAPSHOT"}
|
||||||
}
|
}
|
||||||
:paths ["src" "vendor" "resources"]
|
:paths ["src" "vendor" "resources"]
|
||||||
:aliases
|
:aliases
|
||||||
{:dev {:extra-deps {com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
|
{:dev
|
||||||
com.bhauman/rebel-readline {:mvn/version "0.1.4"}
|
{:extra-deps
|
||||||
com.bhauman/figwheel-main {:mvn/version "0.2.3"}
|
{com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
|
||||||
org.clojure/tools.namespace {:mvn/version "0.3.1"}}
|
com.bhauman/rebel-readline {:mvn/version "0.1.4"}
|
||||||
:extra-paths ["test"]}
|
com.bhauman/figwheel-main {:mvn/version "0.2.3"}
|
||||||
|
org.clojure/tools.namespace {:mvn/version "0.3.1"}}
|
||||||
|
:extra-paths ["test"]}
|
||||||
|
|
||||||
|
:repl
|
||||||
|
{:main-opts ["-m" "rebel-readline.main"]}
|
||||||
|
|
||||||
|
:ancient
|
||||||
|
{:main-opts ["-m" "deps-ancient.deps-ancient"]
|
||||||
|
:extra-deps {deps-ancient {:mvn/version "RELEASE"}}}
|
||||||
|
|
||||||
:repl {:main-opts ["-m" "rebel-readline.main"]}
|
|
||||||
:ancient {:main-opts ["-m" "deps-ancient.deps-ancient"]
|
|
||||||
:extra-deps {deps-ancient {:mvn/version "RELEASE"}}}
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
[:ul.library-elements
|
[:ul.library-elements
|
||||||
(when own?
|
(when own?
|
||||||
[:li
|
[:li
|
||||||
[:a.btn-primary {:on-click #(st/emit! (di/create-collection))}
|
[:a.btn-primary {:on-click #(st/emit! di/create-collection)}
|
||||||
(tr "ds.icons-collection.new")]])
|
(tr "ds.icons-collection.new")]])
|
||||||
(when own?
|
(when own?
|
||||||
[:& nav-item {:selected? (nil? id)}])
|
[:& nav-item {:selected? (nil? id)}])
|
||||||
|
|
|
@ -49,14 +49,11 @@
|
||||||
(def main-build-options
|
(def main-build-options
|
||||||
{:output-dir "resources/public/js"
|
{:output-dir "resources/public/js"
|
||||||
:asset-path "/js"
|
:asset-path "/js"
|
||||||
:modules {:common {:entries #{}
|
:modules {:main {:entries #{"uxbox.main"}
|
||||||
:output-to "resources/public/js/common.js"}
|
:output-to "resources/public/js/main.js"}
|
||||||
:main {:entries #{"uxbox.main"}
|
|
||||||
:output-to "resources/public/js/main.js"
|
|
||||||
:depends-on #{:common}}
|
|
||||||
:view {:entries #{"uxbox.view"}
|
:view {:entries #{"uxbox.view"}
|
||||||
:output-to "resources/public/js/view.js"
|
:output-to "resources/public/js/view.js"
|
||||||
:depends-on #{:common}}}})
|
}}})
|
||||||
|
|
||||||
(def worker-build-options
|
(def worker-build-options
|
||||||
{:main 'uxbox.worker
|
{:main 'uxbox.worker
|
||||||
|
@ -70,7 +67,6 @@
|
||||||
main-build-options
|
main-build-options
|
||||||
dist-build-options)
|
dist-build-options)
|
||||||
(assoc :output-dir "dist/js")
|
(assoc :output-dir "dist/js")
|
||||||
(assoc-in [:modules :common :output-to] "dist/js/common.js")
|
|
||||||
(assoc-in [:modules :main :output-to] "dist/js/main.js")
|
(assoc-in [:modules :main :output-to] "dist/js/main.js")
|
||||||
(assoc-in [:modules :view :output-to] "dist/js/view.js")))
|
(assoc-in [:modules :view :output-to] "dist/js/view.js")))
|
||||||
|
|
||||||
|
@ -99,7 +95,7 @@
|
||||||
(defmethod task "dist:main"
|
(defmethod task "dist:main"
|
||||||
[args]
|
[args]
|
||||||
(let [cfg main-dist-build-options]
|
(let [cfg main-dist-build-options]
|
||||||
;; (pprint cfg)
|
(pprint cfg)
|
||||||
(api/build (api/inputs "src") cfg)))
|
(api/build (api/inputs "src") cfg)))
|
||||||
|
|
||||||
(defmethod task "dist:worker"
|
(defmethod task "dist:worker"
|
||||||
|
|
45
manage.sh
45
manage.sh
|
@ -92,19 +92,29 @@ function build-frontend-local {
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-frontend-image {
|
function build-frontend-image {
|
||||||
|
echo "#############################################"
|
||||||
|
echo "## START build 'uxbox-frontend' image. ##"
|
||||||
|
echo "#############################################"
|
||||||
build-frontend-local "dist" || exit 1;
|
build-frontend-local "dist" || exit 1;
|
||||||
rm -rf docker/frontend/dist || exit 1;
|
# rm -rf docker/frontend/dist || exit 1;
|
||||||
cp -vr frontend/dist docker/frontend/ || exit 1;
|
# cp -vr frontend/dist docker/frontend/ || exit 1;
|
||||||
|
|
||||||
docker build --rm=true \
|
# docker build --rm=true \
|
||||||
-t uxbox-frontend:$REV \
|
# -t uxbox-frontend:$REV \
|
||||||
-t uxbox-frontend:latest \
|
# -t uxbox-frontend:latest \
|
||||||
docker/frontend/;
|
# docker/frontend/;
|
||||||
|
|
||||||
rm -rf docker/frontend/dist || exit 1;
|
# rm -rf docker/frontend/dist || exit 1;
|
||||||
|
echo "#############################################"
|
||||||
|
echo "## END build 'uxbox-frontend' image. ##"
|
||||||
|
echo "#############################################"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-frontend-dbg-image {
|
function build-frontend-dbg-image {
|
||||||
|
echo "#############################################"
|
||||||
|
echo "## START build 'uxbox-frontend-dbg' image. ##"
|
||||||
|
echo "#############################################"
|
||||||
|
|
||||||
build-frontend-local "dbg-dist" || exit 1;
|
build-frontend-local "dbg-dist" || exit 1;
|
||||||
rm -rf docker/frontend/dist || exit 1;
|
rm -rf docker/frontend/dist || exit 1;
|
||||||
cp -vr frontend/dist docker/frontend/ || exit 1;
|
cp -vr frontend/dist docker/frontend/ || exit 1;
|
||||||
|
@ -115,6 +125,11 @@ function build-frontend-dbg-image {
|
||||||
docker/frontend/;
|
docker/frontend/;
|
||||||
|
|
||||||
rm -rf docker/frontend/dist || exit 1;
|
rm -rf docker/frontend/dist || exit 1;
|
||||||
|
|
||||||
|
echo "#############################################"
|
||||||
|
echo "## END build 'uxbox-frontend-dbg' image. ##"
|
||||||
|
echo "#############################################"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-backend-local {
|
function build-backend-local {
|
||||||
|
@ -132,6 +147,10 @@ function build-backend-local {
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-backend-image {
|
function build-backend-image {
|
||||||
|
echo "#############################################"
|
||||||
|
echo "## START build 'uxbox-backend' image. ##"
|
||||||
|
echo "#############################################"
|
||||||
|
|
||||||
build-backend-local || exit 1;
|
build-backend-local || exit 1;
|
||||||
rm -rf docker/backend/dist || exit 1;
|
rm -rf docker/backend/dist || exit 1;
|
||||||
cp -vr backend/dist docker/backend/ || exit 1;
|
cp -vr backend/dist docker/backend/ || exit 1;
|
||||||
|
@ -142,6 +161,11 @@ function build-backend-image {
|
||||||
docker/backend/;
|
docker/backend/;
|
||||||
|
|
||||||
rm -rf docker/backend/dist || exit 1;
|
rm -rf docker/backend/dist || exit 1;
|
||||||
|
|
||||||
|
echo "#############################################"
|
||||||
|
echo "## END build 'uxbox-backend' image. ##"
|
||||||
|
echo "#############################################"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-images {
|
function build-images {
|
||||||
|
@ -176,6 +200,10 @@ function log {
|
||||||
docker-compose -p uxbox -f docker/docker-compose.yml logs -f --tail=50
|
docker-compose -p uxbox -f docker/docker-compose.yml logs -f --tail=50
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function log-devenv {
|
||||||
|
docker-compose -p uxbox-devenv -f docker/devenv/docker-compose.yaml logs -f --tail=50
|
||||||
|
}
|
||||||
|
|
||||||
function stop {
|
function stop {
|
||||||
echo "Stoping containers..."
|
echo "Stoping containers..."
|
||||||
docker-compose -p uxbox -f ./docker/docker-compose.yml stop
|
docker-compose -p uxbox -f ./docker/docker-compose.yml stop
|
||||||
|
@ -225,6 +253,9 @@ case $1 in
|
||||||
stop-devenv)
|
stop-devenv)
|
||||||
stop-devenv ${@:2}
|
stop-devenv ${@:2}
|
||||||
;;
|
;;
|
||||||
|
log-devenv)
|
||||||
|
log-devenv ${@:2}
|
||||||
|
;;
|
||||||
|
|
||||||
## testin related commands
|
## testin related commands
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue