mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -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:
|
||||
- ./manage.sh build
|
||||
- ./manage.sh release
|
||||
- docker build -t uxbox-backend backend/
|
||||
- docker build -t uxbox-frontend frontend/
|
||||
- ./manage.sh release-local
|
||||
- ./manage.sh release-docker
|
||||
|
||||
after_script:
|
||||
- docker images
|
||||
|
|
|
@ -69,6 +69,9 @@ RUN set -ex; \
|
|||
scripts/figwheel.clj; \
|
||||
npm install; \
|
||||
npm run dist; \
|
||||
./scripts/dist-main; \
|
||||
./scripts/dist-view; \
|
||||
./scripts/dist-worker; \
|
||||
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
|
||||
}
|
||||
|
||||
function release_image {
|
||||
function release_local {
|
||||
cd frontend
|
||||
echo "Building frontend release..."
|
||||
rm -rf ./dist
|
||||
|
@ -55,8 +55,20 @@ function release_image {
|
|||
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 {
|
||||
echo "USAGE: $0 [ build | run | release ]"
|
||||
echo "USAGE: $0 [ build | run | release-local | release-docker ]"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
@ -66,7 +78,10 @@ case $1 in
|
|||
run)
|
||||
run_image
|
||||
;;
|
||||
release)
|
||||
release-local)
|
||||
release_local
|
||||
;;
|
||||
release-docker)
|
||||
release_image
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Reference in a new issue