forked from mirrors/easyappointments
test: update build files
This commit is contained in:
parent
5b4660a865
commit
2bc1fe0d34
2 changed files with 56 additions and 39 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -6,7 +6,7 @@
|
|||
/docs/jsdoc/html
|
||||
/docs/plato/html
|
||||
/docker/mysql/*
|
||||
/docker/build/output/*
|
||||
/docker/build/iflrandevu-*
|
||||
!/docker/mysql/.gitkeep
|
||||
/node_modules/
|
||||
/npm-debug.log
|
||||
|
|
|
@ -1,20 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Docker commands to build iflrandevu
|
||||
# First setup docker and install alpine image
|
||||
# Approximately 10min (tested with 4vcpu / 8GB RAM / 30Mbps network speed)
|
||||
# Docker commands (will be converted to dockerfile)
|
||||
|
||||
IFLRANDEVU_VER="1.4.3-ifl.2" # UPDATE MANUALLY !
|
||||
|
||||
|
||||
_RED='\033[0;31m'
|
||||
_NC='\033[0m \e[0m' # No Color, No Effect
|
||||
if [[ $1 != "docker" ]]; then
|
||||
if [[ $(pwd) != *iflrandevu/docker/build ]]; then
|
||||
echo "PLEASE CHANGE DIRECTORY TO \`iflrandevu/docker/build\` BEFORE STARTING SCRIPT"
|
||||
exit
|
||||
fi
|
||||
docker rm IFLRANDEVU_BUILDER
|
||||
docker run -it -d --name IFLRANDEVU_BUILDER --mount type=bind,source=".",target=/link/ alpine:latest "/bin/sh"
|
||||
echo -e "RUN COMMANDS IN ALPINE DOCKER"
|
||||
echo -e "RUN SCRIPT: \`${_RED}apk add bash && bash /link/docker.sh docker${_NC}\`"
|
||||
docker attach IFLRANDEVU_BUILDER --detach-keys="ctrl-k"
|
||||
|
||||
if [[ 1 -eq 1 ]]; then
|
||||
echo "RUN COMMANDS IN ALPINE DOCKER"
|
||||
exit
|
||||
fi
|
||||
|
||||
elif [[ $1 == "docker" ]]; then
|
||||
set -ex
|
||||
# Inside Alpine Docker
|
||||
apk update && apk upgrade
|
||||
apk add git npm composer
|
||||
|
@ -35,12 +42,22 @@ apk add zip
|
|||
echo "DELETING OLD BUILD FILE!!! (after waiting 30 sec)"
|
||||
sleep 30
|
||||
mkdir -p /link/output/
|
||||
rm /link/output/IFLRANDEVU_BUILD_OUTPUT_LATEST.zip
|
||||
if [[ -f "/link/iflrandevu-$IFLRANDEVU_VER.zip" ]]; then
|
||||
echo "THIS VERSION ALREADY EXIST"
|
||||
sleep 1
|
||||
echo "DELETING OLD ARCHIVE"
|
||||
sleep 5
|
||||
rm "/link/iflrandevu-$IFLRANDEVU_VER.zip"
|
||||
fi
|
||||
|
||||
cd /docker_build/iflrandevu/build/
|
||||
zip -r /link/output/IFLRANDEVU_BUILD_OUTPUT_LATEST.zip ./*
|
||||
zip -r "/link/iflrandevu-$IFLRANDEVU_VER.zip" ./*
|
||||
sleep 5
|
||||
echo "BYE!"
|
||||
exit
|
||||
|
||||
# TODO run itself
|
||||
# TODO dockerfile
|
||||
fi
|
||||
|
||||
echo "EXIT"
|
||||
|
||||
# TODO convert to dockerfile
|
||||
|
|
Loading…
Reference in a new issue