diff --git a/infrastructure/excalidraw-backend/image/Dockerfile b/infrastructure/excalidraw-backend/image/Dockerfile index a11916d..6802f7b 100644 --- a/infrastructure/excalidraw-backend/image/Dockerfile +++ b/infrastructure/excalidraw-backend/image/Dockerfile @@ -1,12 +1,11 @@ # Taken from: https://github.com/jitsi/excalidraw-backend -FROM node:16.17-slim +FROM node:18.18.2-slim WORKDIR /excalidraw-backend +COPY resources/package.json resources/package-lock.json resources/tsconfig.json resources/install.sh resources/src ./ -COPY resources/package.json resources/package-lock.json resources/tsconfig.json resources/src ./ -RUN npm install -RUN npm run build +RUN ./install.sh EXPOSE 80 EXPOSE 9090 diff --git a/infrastructure/excalidraw-backend/image/resources/.gitignore b/infrastructure/excalidraw-backend/image/resources/.gitignore deleted file mode 100644 index 2fe28d5..0000000 --- a/infrastructure/excalidraw-backend/image/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!package-lock.json \ No newline at end of file diff --git a/infrastructure/excalidraw-backend/image/resources/install.sh b/infrastructure/excalidraw-backend/image/resources/install.sh new file mode 100755 index 0000000..e92cc44 --- /dev/null +++ b/infrastructure/excalidraw-backend/image/resources/install.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -Eeo pipefail + +apt-get update > /dev/null +apt-get upgrade -y > /dev/null +apt-get clean + +npm install -g npm +npm ci +npm run build diff --git a/infrastructure/web/image/resources/install.sh b/infrastructure/web/image/resources/install.sh index 512c110..1f55e4c 100755 --- a/infrastructure/web/image/resources/install.sh +++ b/infrastructure/web/image/resources/install.sh @@ -1,7 +1,10 @@ #!/bin/bash set -Eeo pipefail -apt update > /dev/null +apt-get update > /dev/null +apt-get upgrade -y > /dev/null +apt-get clean + install -m 0700 /tmp/install-debug.sh /usr/local/bin/ install -m 0644 /tmp/settings-config.js /defaults/settings-config.js \ No newline at end of file