release: beta_v0.9.0

Development
This commit is contained in:
JJ Grobler 2025-03-27 13:33:20 +02:00 committed by GitHub
commit edc554c5c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 54 additions and 219 deletions

6
.gitignore vendored
View file

@ -1,6 +1,12 @@
# Environment Variables # Environment Variables
.env .env
# Custom Apps
# Custom apps should be set when the image is built
apps.json
apps-test-output.json
# mounted volume # mounted volume
sites sites

View file

@ -2,7 +2,8 @@ x-customizable-image: &customizable_image
# By default the image used only contains the `frappe` and `erpnext` apps. # By default the image used only contains the `frappe` and `erpnext` apps.
# about using custom images. # about using custom images.
#TODO Replace Image with Custom Image for production. See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md #TODO Replace Image with Custom Image for production. See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md
image: frappe/erpnext:${ERPNEXT_VERSION:?No ERPNext version set} image: rafnav/rafnav_bench:1.0
pull_policy: ${PULL_POLICY:-always}
x-depends-on-configurator: &depends_on_configurator x-depends-on-configurator: &depends_on_configurator
depends_on: depends_on:

View file

@ -1,6 +1,6 @@
{ {
"name": "Frappe Bench", "name": "Frappe Bench",
"forwardPorts": [8000, 9000, 6787], "forwardPorts": [8000, 9000, 6787, 8080],
"remoteUser": "frappe", "remoteUser": "frappe",
"customizations": { "customizations": {
"vscode": { "vscode": {

View file

@ -55,6 +55,7 @@ services:
ports: ports:
- 8000-8005:8000-8005 - 8000-8005:8000-8005
- 9000-9005:9000-9005 - 9000-9005:9000-9005
- 8080:8080
# enable the below service if you need Cypress UI Tests to be executed # enable the below service if you need Cypress UI Tests to be executed
# Before enabling ensure install_x11_deps.sh has been executed and display variable is exported. # Before enabling ensure install_x11_deps.sh has been executed and display variable is exported.
# Run install_x11_deps.sh again if DISPLAY is not set # Run install_x11_deps.sh again if DISPLAY is not set

View file

@ -1,12 +1,4 @@
[ [
{
"url": "https://github.com/cronos-capital/LMS.git",
"branch": "development"
},
{
"url": "https://github.com/cronos-capital/RAFNAV_ERP.git",
"branch": "development"
},
{ {
"url": "https://github.com/cronos-capital/raf_finance.git", "url": "https://github.com/cronos-capital/raf_finance.git",
"branch": "development" "branch": "development"
@ -23,10 +15,6 @@
"url": "https://github.com/cronos-capital/filing.git", "url": "https://github.com/cronos-capital/filing.git",
"branch": "development" "branch": "development"
}, },
{
"url": "https://github.com/cronos-capital/LRMS.git",
"branch": "development"
},
{ {
"url": "https://github.com/cronos-capital/rafnav_core.git", "url": "https://github.com/cronos-capital/rafnav_core.git",
"branch": "development" "branch": "development"

View file

@ -1,7 +1,5 @@
# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md # Reference: https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md
ERPNEXT_VERSION=v15.23.1
DB_PASSWORD=123 DB_PASSWORD=123
# Only if you use external database # Only if you use external database
@ -13,7 +11,7 @@ REDIS_CACHE=
REDIS_QUEUE= REDIS_QUEUE=
# Only with HTTPS override # Only with HTTPS override
LETSENCRYPT_EMAIL=mail@example.com LETSENCRYPT_EMAIL=example@example.com
# These environment variables are not required. # These environment variables are not required.
@ -46,4 +44,4 @@ CLIENT_MAX_BODY_SIZE=
# List of sites for letsencrypt certificates quoted with backtick (`) and separated by comma (,) # List of sites for letsencrypt certificates quoted with backtick (`) and separated by comma (,)
# More https://doc.traefik.io/traefik/routing/routers/#rule # More https://doc.traefik.io/traefik/routing/routers/#rule
# About acme https://doc.traefik.io/traefik/https/acme/#domain-definition # About acme https://doc.traefik.io/traefik/https/acme/#domain-definition
SITES=`erp.example.com` SITES=

View file

@ -1,170 +0,0 @@
FROM debian:bookworm-slim as bench
LABEL author=frappé
ARG GIT_REPO=https://github.com/frappe/bench.git
ARG GIT_BRANCH=v5.x
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# For frappe framework
git \
mariadb-client \
postgresql-client \
gettext-base \
wget \
# for PDF
libssl-dev \
fonts-cantarell \
xfonts-75dpi \
xfonts-base \
# weasyprint dependencies
libpango-1.0-0 \
libharfbuzz0b \
libpangoft2-1.0-0 \
libpangocairo-1.0-0 \
# to work inside the container
locales \
build-essential \
cron \
curl \
vim \
sudo \
iputils-ping \
watch \
tree \
nano \
less \
software-properties-common \
bash-completion \
# For psycopg2
libpq-dev \
# Other
libffi-dev \
liblcms2-dev \
libldap2-dev \
libmariadb-dev \
libsasl2-dev \
libtiff5-dev \
libwebp-dev \
redis-tools \
rlwrap \
tk8.6-dev \
ssh-client \
# VSCode container requirements
net-tools \
# For pyenv build dependencies
# https://github.com/frappe/frappe_docker/issues/840#issuecomment-1185206895
make \
# For pandas
libbz2-dev \
# For bench execute
libsqlite3-dev \
# For other dependencies
zlib1g-dev \
libreadline-dev \
llvm \
libncurses5-dev \
libncursesw5-dev \
xz-utils \
tk-dev \
liblzma-dev \
file \
&& rm -rf /var/lib/apt/lists/*
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales
# Detect arch and install wkhtmltopdf
ARG WKHTMLTOPDF_VERSION=0.12.6.1-3
ARG WKHTMLTOPDF_DISTRO=bookworm
RUN if [ "$(uname -m)" = "aarch64" ]; then export ARCH=arm64; fi \
&& if [ "$(uname -m)" = "x86_64" ]; then export ARCH=amd64; fi \
&& downloaded_file=wkhtmltox_${WKHTMLTOPDF_VERSION}.${WKHTMLTOPDF_DISTRO}_${ARCH}.deb \
&& wget -q https://github.com/wkhtmltopdf/packaging/releases/download/$WKHTMLTOPDF_VERSION/$downloaded_file \
&& dpkg -i $downloaded_file \
&& rm $downloaded_file
# Create new user with home directory, improve docker compatibility with UID/GID 1000,
# add user to sudo group, allow passwordless sudo, switch to that user
# and change directory to user home directory
RUN groupadd -g 1000 frappe \
&& useradd --no-log-init -r -m -u 1000 -g 1000 -G sudo frappe \
&& echo "frappe ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER frappe
WORKDIR /home/frappe
# Install Python via pyenv
ENV PYTHON_VERSION_V14=3.10.13
ENV PYTHON_VERSION=3.12.3
ENV PYENV_ROOT /home/frappe/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
# From https://github.com/pyenv/pyenv#basic-github-checkout
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
&& pyenv install $PYTHON_VERSION_V14 \
&& pyenv install $PYTHON_VERSION \
&& PYENV_VERSION=$PYTHON_VERSION_V14 pip install --no-cache-dir virtualenv \
&& PYENV_VERSION=$PYTHON_VERSION pip install --no-cache-dir virtualenv \
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_v14 \
&& sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \
&& echo 'eval "$(pyenv init --path)"' >>~/.profile \
&& echo 'eval "$(pyenv init -)"' >>~/.bashrc
# Clone and install bench in the local user home directory
# For development, bench source is located in ~/.bench
ENV PATH /home/frappe/.local/bin:$PATH
# Skip editable-bench warning
# https://github.com/frappe/bench/commit/20560c97c4246b2480d7358c722bc9ad13606138
RUN git clone ${GIT_REPO} --depth 1 -b ${GIT_BRANCH} .bench \
&& pip install --no-cache-dir --user -e .bench \
&& echo "export PATH=/home/frappe/.local/bin:\$PATH" >>/home/frappe/.bashrc \
&& echo "export BENCH_DEVELOPER=1" >>/home/frappe/.bashrc
# Install homebrew and wget
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \
&& (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/frappe/.profile \
&& eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
&& brew install gcc \
&& brew install wget
# Add aliases
RUN touch $HOME/.bash_aliases \
&& echo "alias py='python'" >> $HOME/.bash_aliases \
&& echo "alias frap-install='py installer.py'" >> $HOME/.bash_aliases
# Install Node via nvm
ENV NODE_VERSION_STABLE=16.20.2
ENV NODE_VERSION=20.13.1
ENV NVM_DIR /home/frappe/.nvm
ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \
&& . ${NVM_DIR}/nvm.sh \
&& nvm install ${NODE_VERSION_STABLE} \
&& nvm use v${NODE_VERSION_STABLE} \
&& npm install -g yarn \
&& nvm install v${NODE_VERSION} \
&& npm install -g yarn \
&& rm -rf ${NVM_DIR}/.cache \
&& echo 'export NVM_DIR="/home/frappe/.nvm"' >>~/.bashrc \
&& echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
&& echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc
EXPOSE 8000-8005 9000-9005 6787
FROM bench as bench-test
# Print version and verify bashrc is properly sourced so that everything works
# in the interactive shell and Dockerfile
RUN node --version \
&& npm --version \
&& yarn --version \
&& bench --help
RUN bash -c "node --version" \
&& bash -c "npm --version" \
&& bash -c "yarn --version" \
&& bash -c "bench --help"

View file

@ -96,16 +96,13 @@ USER frappe
WORKDIR /home/frappe WORKDIR /home/frappe
# Install Python via pyenv # Install Python via pyenv
ENV PYTHON_VERSION_V14=3.10.13
ENV PYTHON_VERSION=3.12.3 ENV PYTHON_VERSION=3.12.3
ENV PYENV_ROOT /home/frappe/.pyenv ENV PYENV_ROOT /home/frappe/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
# From https://github.com/pyenv/pyenv#basic-github-checkout # From https://github.com/pyenv/pyenv#basic-github-checkout
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \ RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
&& pyenv install $PYTHON_VERSION_V14 \
&& pyenv install $PYTHON_VERSION \ && pyenv install $PYTHON_VERSION \
&& PYENV_VERSION=$PYTHON_VERSION_V14 pip install --no-cache-dir virtualenv \
&& PYENV_VERSION=$PYTHON_VERSION pip install --no-cache-dir virtualenv \ && PYENV_VERSION=$PYTHON_VERSION pip install --no-cache-dir virtualenv \
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_v14 \ && pyenv global $PYTHON_VERSION $PYTHON_VERSION_v14 \
&& sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \ && sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \
@ -127,23 +124,20 @@ RUN git clone ${GIT_REPO} --depth 1 -b ${GIT_BRANCH} .bench \
RUN touch ~/.bash_aliases \ RUN touch ~/.bash_aliases \
&& echo 'alias py="python"' >> ~/.bash_aliases \ && echo 'alias py="python"' >> ~/.bash_aliases \
&& echo 'alias frap-install="py installer.py"'>> ~/.bash_aliases \ && echo 'alias frap-install="py installer.py"'>> ~/.bash_aliases \
&& echo 'alias install-rafnav="bench install-app erpnext documentation lending filing matter_management lrms raf_finance rafnav_core"' >> ~/.bash_aliases \ && echo 'alias install-rafnav="bench install-app documentation filing matter_management raf_finance rafnav_core"' >> ~/.bash_aliases \
&& echo 'alias install-site-rafnav="bench new-site rafnav.localhost && bench use rafnav.localhost && install-rafnav"' >> ~/.bash_aliases \ && echo 'alias install-site-rafnav="bench new-site rafnav.localhost && bench use rafnav.localhost && install-rafnav"' >> ~/.bash_aliases \
&& echo 'alias start-dev="cd /workspace/development/rafnav_bench && bench start"' >> ~/.bash_aliases && echo 'alias start-dev="cd /workspace/development/rafnav_bench && bench start && cd apps/matter_management/rafnav_ui && yarn dev"' >> ~/.bash_aliases
# Install Node via nvm # Install Node via nvm
ENV NODE_VERSION_STABLE=16.20.2 ENV NODE_VERSION=22.14.0
ENV NODE_VERSION=20.13.1
ENV NVM_DIR /home/frappe/.nvm ENV NVM_DIR /home/frappe/.nvm
ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH} ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \
&& . ${NVM_DIR}/nvm.sh \ && . ${NVM_DIR}/nvm.sh \
&& nvm install ${NODE_VERSION_STABLE} \ && nvm install ${NODE_VERSION} \
&& nvm use v${NODE_VERSION_STABLE} \ && nvm use v${NODE_VERSION} \
&& npm install -g yarn \
&& nvm install v${NODE_VERSION} \
&& npm install -g yarn \ && npm install -g yarn \
&& rm -rf ${NVM_DIR}/.cache \ && rm -rf ${NVM_DIR}/.cache \
&& echo 'export NVM_DIR="/home/frappe/.nvm"' >>~/.bashrc \ && echo 'export NVM_DIR="/home/frappe/.nvm"' >>~/.bashrc \
@ -151,7 +145,7 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh |
&& echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc && echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc
EXPOSE 8000-8005 9000-9005 6787 EXPOSE 8000-8005 9000-9005 6787 8080
RUN (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/frappe/.profile \ RUN (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/frappe/.profile \
&& eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

View file

@ -1,12 +1,15 @@
ARG PYTHON_VERSION=3.11.6 ARG PYTHON_VERSION=3.12.3
ARG DEBIAN_BASE=bookworm ARG DEBIAN_BASE=bookworm
FROM python:${PYTHON_VERSION}-slim-${DEBIAN_BASE} AS base FROM python:${PYTHON_VERSION}-slim-${DEBIAN_BASE} AS base
COPY resources/nginx-template.conf /templates/nginx/frappe.conf.template
COPY resources/nginx-entrypoint.sh /usr/local/bin/nginx-entrypoint.sh
ARG WKHTMLTOPDF_VERSION=0.12.6.1-3 ARG WKHTMLTOPDF_VERSION=0.12.6.1-3
ARG WKHTMLTOPDF_DISTRO=bookworm ARG WKHTMLTOPDF_DISTRO=bookworm
ARG NODE_VERSION=18.18.2 ARG NODE_VERSION=22.14.0
ENV NVM_DIR=/home/frappe/.nvm ENV NVM_DIR=/home/frappe/.nvm
ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH} ENV PATH=${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}
RUN useradd -ms /bin/bash frappe \ RUN useradd -ms /bin/bash frappe \
&& apt-get update \ && apt-get update \
@ -65,10 +68,9 @@ RUN useradd -ms /bin/bash frappe \
&& chown -R frappe:frappe /etc/nginx/nginx.conf \ && chown -R frappe:frappe /etc/nginx/nginx.conf \
&& chown -R frappe:frappe /var/log/nginx \ && chown -R frappe:frappe /var/log/nginx \
&& chown -R frappe:frappe /var/lib/nginx \ && chown -R frappe:frappe /var/lib/nginx \
&& chown -R frappe:frappe /run/nginx.pid && chown -R frappe:frappe /run/nginx.pid \
&& chmod 755 /usr/local/bin/nginx-entrypoint.sh \
COPY resources/nginx-template.conf /templates/nginx/frappe.conf.template && chmod 644 /templates/nginx/frappe.conf.template
COPY resources/nginx-entrypoint.sh /usr/local/bin/nginx-entrypoint.sh
FROM base AS builder FROM base AS builder
@ -76,6 +78,12 @@ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# For frappe framework # For frappe framework
wget \ wget \
#for building arm64 binaries
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
# For psycopg2 # For psycopg2
libpq-dev \ libpq-dev \
# Other # Other
@ -86,6 +94,7 @@ RUN apt-get update \
libsasl2-dev \ libsasl2-dev \
libtiff5-dev \ libtiff5-dev \
libwebp-dev \ libwebp-dev \
pkg-config \
redis-tools \ redis-tools \
rlwrap \ rlwrap \
tk8.6-dev \ tk8.6-dev \
@ -96,13 +105,21 @@ RUN apt-get update \
libbz2-dev \ libbz2-dev \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# apps.json includes
ARG APPS_JSON_BASE64
RUN if [ -n "${APPS_JSON_BASE64}" ]; then \
mkdir /opt/frappe && echo "${APPS_JSON_BASE64}" | base64 -d > /opt/frappe/apps.json; \
fi
USER frappe USER frappe
ARG FRAPPE_BRANCH=version-15 ARG FRAPPE_BRANCH=version-15
ARG FRAPPE_PATH=https://github.com/frappe/frappe ARG FRAPPE_PATH=https://github.com/frappe/frappe
ARG ERPNEXT_REPO=https://github.com/frappe/erpnext RUN export APP_INSTALL_ARGS="" && \
ARG ERPNEXT_BRANCH=version-15 if [ -n "${APPS_JSON_BASE64}" ]; then \
RUN bench init \ export APP_INSTALL_ARGS="--apps_path=/opt/frappe/apps.json"; \
fi && \
bench init ${APP_INSTALL_ARGS}\
--frappe-branch=${FRAPPE_BRANCH} \ --frappe-branch=${FRAPPE_BRANCH} \
--frappe-path=${FRAPPE_PATH} \ --frappe-path=${FRAPPE_PATH} \
--no-procfile \ --no-procfile \
@ -111,11 +128,11 @@ RUN bench init \
--verbose \ --verbose \
/home/frappe/frappe-bench && \ /home/frappe/frappe-bench && \
cd /home/frappe/frappe-bench && \ cd /home/frappe/frappe-bench && \
bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ${ERPNEXT_REPO} && \
echo "{}" > sites/common_site_config.json && \ echo "{}" > sites/common_site_config.json && \
bench build --production \
find apps -mindepth 1 -path "*/.git" | xargs rm -fr find apps -mindepth 1 -path "*/.git" | xargs rm -fr
FROM base as erpnext FROM base AS backend
USER frappe USER frappe