From 3f65e951278ed0db8a1cd568601344954135a5d7 Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Mon, 13 Dec 2021 19:26:03 +0300 Subject: [PATCH] Remove old erpnext images --- build/erpnext-nginx/Dockerfile | 35 -------------------------- build/erpnext-nginx/install_app.sh | 40 ------------------------------ build/erpnext-worker/Dockerfile | 15 ----------- 3 files changed, 90 deletions(-) delete mode 100644 build/erpnext-nginx/Dockerfile delete mode 100755 build/erpnext-nginx/install_app.sh delete mode 100644 build/erpnext-worker/Dockerfile diff --git a/build/erpnext-nginx/Dockerfile b/build/erpnext-nginx/Dockerfile deleted file mode 100644 index 69e2614f..00000000 --- a/build/erpnext-nginx/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -ARG NODE_IMAGE_TAG=14-bullseye-slim -ARG DOCKER_REGISTRY_PREFIX=frappe -ARG IMAGE_TAG=develop - -FROM node:${NODE_IMAGE_TAG} as builder - -ARG GIT_REPO=https://github.com/frappe/erpnext -ARG GIT_BRANCH=develop - -ARG FRAPPE_BRANCH=${GIT_BRANCH} - -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - python2 \ - git \ - build-essential \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* - -COPY build/erpnext-nginx/install_app.sh /install_app -RUN chmod +x /install_app \ - && /install_app erpnext ${GIT_REPO} ${GIT_BRANCH} ${FRAPPE_BRANCH} - - -FROM ${DOCKER_REGISTRY_PREFIX}/frappe-nginx:${IMAGE_TAG} - -COPY --from=builder --chown=1000:1000 /home/frappe/frappe-bench/sites/ /var/www/html/ -COPY --from=builder /rsync /rsync - -RUN echo "erpnext" >> /var/www/html/apps.txt - -VOLUME [ "/assets" ] - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["nginx", "-g", "daemon off;"] diff --git a/build/erpnext-nginx/install_app.sh b/build/erpnext-nginx/install_app.sh deleted file mode 100755 index 085dbaeb..00000000 --- a/build/erpnext-nginx/install_app.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -e - -APP_NAME=${1} -APP_REPO=${2} -APP_BRANCH=${3} -FRAPPE_BRANCH=${4} - -[ "${APP_BRANCH}" ] && BRANCH="-b ${APP_BRANCH}" - -mkdir -p /home/frappe/frappe-bench -cd /home/frappe/frappe-bench -mkdir -p apps "sites/assets/${APP_NAME}" -echo -ne "frappe\n${APP_NAME}" >sites/apps.txt - -git clone --depth 1 -b "${FRAPPE_BRANCH}" https://github.com/frappe/frappe apps/frappe -# shellcheck disable=SC2086 -git clone --depth 1 ${BRANCH} ${APP_REPO} apps/${APP_NAME} - -echo "Install frappe NodeJS dependencies . . ." -cd apps/frappe -yarn --pure-lockfile - -echo "Install ${APP_NAME} NodeJS dependencies . . ." -yarn --pure-lockfile --cwd "../${APP_NAME}" - -echo "Build ${APP_NAME} assets . . ." -yarn production --app "${APP_NAME}" - -cd /home/frappe/frappe-bench -# shellcheck disable=SC2086 -cp -R apps/${APP_NAME}/${APP_NAME}/public/* sites/assets/${APP_NAME} - -# Add frappe and all the apps available under in frappe-bench here -echo "rsync -a --delete /var/www/html/assets/frappe /assets" >/rsync -echo "rsync -a --delete /var/www/html/assets/${APP_NAME} /assets" >>/rsync -chmod +x /rsync - -rm sites/apps.txt diff --git a/build/erpnext-worker/Dockerfile b/build/erpnext-worker/Dockerfile deleted file mode 100644 index a26b4f9e..00000000 --- a/build/erpnext-worker/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -ARG IMAGE_TAG=develop -ARG DOCKER_REGISTRY_PREFIX=frappe -FROM ${DOCKER_REGISTRY_PREFIX}/frappe-worker:${IMAGE_TAG} - -ARG GIT_REPO=https://github.com/frappe/erpnext -ARG GIT_BRANCH=develop - -USER root -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - gcc \ - && rm -rf /var/lib/apt/lists/* - -USER frappe -RUN install_app erpnext ${GIT_REPO} ${GIT_BRANCH}