1
0
Fork 0
mirror of synced 2024-06-01 18:20:18 +12:00

Fixing cleanup script, adding ARM support to dockerfile, as well as adding ARM client.

This commit is contained in:
mike12345567 2022-06-21 17:56:55 +01:00
parent cb153c7da6
commit 358d15a8ad
5 changed files with 44 additions and 5 deletions

View file

@ -20,6 +20,8 @@ RUN node /pinVersions.js && yarn && yarn build && /cleanup.sh
FROM couchdb:3.2.1
ARG TARGETARCH
COPY --from=build /app /app
COPY --from=build /worker /worker
@ -66,7 +68,7 @@ RUN mkdir /etc/nginx/logs && \
WORKDIR /
RUN mkdir -p scripts/integrations/oracle
ADD packages/server/scripts/integrations/oracle scripts/integrations/oracle
RUN /bin/bash -e ./scripts/integrations/oracle/instantclient/linux/x86-64/install.sh
RUN /bin/bash -e ./scripts/integrations/oracle/instantclient/linux/install.sh
# setup clouseau
WORKDIR /

View file

@ -0,0 +1,23 @@
#!/bin/bash
# Must be root to continue
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
# Allow for re-runs
rm -rf /opt/oracle
echo "Installing oracle instant client"
# copy and unzip package
mkdir -p /opt/oracle
cp scripts/integrations/oracle/instantclient/linux/arm64/basiclite-19.10.zip /opt/oracle
cd /opt/oracle
unzip -qq basiclite-19.10.zip -d .
rm *.zip
mv instantclient* instantclient
# update runtime link path
sh -c "echo /opt/oracle/instantclient > /etc/ld.so.conf.d/oracle-instantclient.conf"
ldconfig /etc/ld.so.conf.d
echo "Installation complete"

View file

@ -0,0 +1,9 @@
#!/bin/bash
if [[ $TARGETARCH == arm* ]] ;
then
echo "Installing ARM Oracle instant client..."
arm64/install.sh
else
echo "Installing x86-64 Oracle instant client..."
x86-64/install.sh
fi

View file

@ -1,11 +1,16 @@
#!/bin/bash
dir=$(pwd)
mv dist /
mv package.json /
declare -a keep=("dist" "package.json" "yarn.lock" "client" "builder" "build" "pm2.config.js" "docker_run.sh")
for moveDir in "${keep[@]}"
do
mv $moveDir / 2>/dev/null
done
cd /
rm -r $dir
mkdir $dir
mv /dist $dir
mv /package.json $dir
for keepDir in "${keep[@]}"
do
mv /$keepDir $dir/ 2>/dev/null
done
cd $dir
NODE_ENV=production yarn