2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-10 09:02:13 +00:00

Remove old erpnext images

This commit is contained in:
Lev Vereshchagin 2021-12-13 19:26:03 +03:00
parent b62b3758a7
commit 3f65e95127
3 changed files with 0 additions and 90 deletions

View File

@ -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;"]

View File

@ -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

View File

@ -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}