mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 22:22:43 -05:00
🐳 💚 Build release image
This commit is contained in:
parent
c44a1e0c0b
commit
7ccc3f30e5
3 changed files with 23 additions and 6 deletions
|
@ -16,9 +16,8 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./manage.sh build
|
- ./manage.sh build
|
||||||
- ./manage.sh release
|
- ./manage.sh release-local
|
||||||
- docker build -t uxbox-backend backend/
|
- ./manage.sh release-docker
|
||||||
- docker build -t uxbox-frontend frontend/
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- docker images
|
- docker images
|
||||||
|
|
|
@ -69,6 +69,9 @@ RUN set -ex; \
|
||||||
scripts/figwheel.clj; \
|
scripts/figwheel.clj; \
|
||||||
npm install; \
|
npm install; \
|
||||||
npm run dist; \
|
npm run dist; \
|
||||||
|
./scripts/dist-main; \
|
||||||
|
./scripts/dist-view; \
|
||||||
|
./scripts/dist-worker; \
|
||||||
rm -rf ./dist/**/*.gz ./dist/**/*.br
|
rm -rf ./dist/**/*.gz ./dist/**/*.br
|
||||||
|
|
||||||
|
|
||||||
|
|
21
manage.sh
21
manage.sh
|
@ -34,7 +34,7 @@ function run_image {
|
||||||
-p 3449:3449 -p 6060:6060 -p 9090:9090 $IMGNAME:$REV
|
-p 3449:3449 -p 6060:6060 -p 9090:9090 $IMGNAME:$REV
|
||||||
}
|
}
|
||||||
|
|
||||||
function release_image {
|
function release_local {
|
||||||
cd frontend
|
cd frontend
|
||||||
echo "Building frontend release..."
|
echo "Building frontend release..."
|
||||||
rm -rf ./dist
|
rm -rf ./dist
|
||||||
|
@ -55,8 +55,20 @@ function release_image {
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function release_image {
|
||||||
|
echo "Building frontend release..."
|
||||||
|
rm -rf ./frontend/dist ./frontend/node_modules ./frontend/dist
|
||||||
|
sudo docker build --rm=true -t $IMGNAME-frontend:$REV frontend/
|
||||||
|
echo "Frontend release image generated"
|
||||||
|
|
||||||
|
echo "Building backend release..."
|
||||||
|
rm -rf ./backend/dist
|
||||||
|
sudo docker build --rm=true -t $IMGNAME-backend:$REV backend/
|
||||||
|
echo "Backend release image generated"
|
||||||
|
}
|
||||||
|
|
||||||
function usage {
|
function usage {
|
||||||
echo "USAGE: $0 [ build | run | release ]"
|
echo "USAGE: $0 [ build | run | release-local | release-docker ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
@ -66,7 +78,10 @@ case $1 in
|
||||||
run)
|
run)
|
||||||
run_image
|
run_image
|
||||||
;;
|
;;
|
||||||
release)
|
release-local)
|
||||||
|
release_local
|
||||||
|
;;
|
||||||
|
release-docker)
|
||||||
release_image
|
release_image
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Add table
Reference in a new issue