Skip to content

Commit

Permalink
v-15
Browse files Browse the repository at this point in the history
  • Loading branch information
njsubedi committed May 1, 2024
1 parent f4b2e2d commit 6328eb1
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 259 deletions.
15 changes: 8 additions & 7 deletions CloudronManifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"manifestVersion": 2,
"minBoxVersion": "7.3.3",
"id": "com.erpnext.cloudronapp",
"website": "https://www.erpnext.com",
"contactEmail": "support@erpnext.com",
"title": "erpnext",
"author": "erpnext authors",
"tagline": "The most agile ERP on the planet",
"version": "0.1.1",
"id": "com.frappeframework.cloudronapp",
"website": "https://www.frappeframework.com",
"contactEmail": "support@frappeframework.com",
"title": "Frappe Framework",
"author": "Frappe Framework Authors",
"tagline": "Low code, open source, web framework in Python and Javascript for the 21st century ",
"version": "15.25.0",
"icon": "manifest/logo.png",
"description": "file://manifest/DESCRIPTION.md",
"changelog": "file://manifest/CHANGELOG.md",
Expand All @@ -22,6 +22,7 @@
"sendmail": {
"supportsDisplayName": true
},
"recvmail": {},
"ldap": {},
"redis": {
"noPassword": true
Expand Down
25 changes: 17 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4

# Remove unnecessary database and php packages (takes some time)
# install mariadb (10.6 default), python (3.10 default) and required python3 packages
RUN apt-get remove -y --purge mongodb-* postgresql-* *mysql* *mariadb* \
&& sudo rm -rf /etc/mysql /var/lib/mysql \
&& apt-get -y autoremove \
&& apt-get -y autoclean \
&& apt-get -y update \
&& apt-get install -y --reinstall --fix-missing \
&& apt-get -y autoclean

RUN apt-get -y update && \
apt-get install -y --reinstall --fix-missing \
wkhtmltopdf xvfb libfontconfig fonts-cantarell xfonts-75dpi xfonts-base \
python3-setuptools python3 python3-dev python3-pip python3-venv python3-distutils uwsgi-plugin-python3 \
libssl-dev\
mariadb-server mariadb-backup\
&& pip3 install frappe-bench
mariadb-server mariadb-backup

RUN pip3 install frappe-bench

ENV FRAPPE_VERSION=v14.21.1 ERPNEXT_VERSION=v14.12.0
ENV FRAPPE_VERSION=v15.25.0

RUN mkdir -p /app/code/frappe-bench /app/pkg && \
chown -R 1000:1000 /app/code
Expand Down Expand Up @@ -43,6 +45,9 @@ RUN mkdir -p /app/pkg/frappe-bench-orig \
&& mv /app/code/frappe-bench/apps /app/pkg/frappe-bench-orig/apps \
&& ln -sf /app/data/frappe/apps /app/code/frappe-bench/apps \
\
&& mkdir -p /app/pkg/frappe-bench-orig/archived \
&& ln -sf /app/data/frappe/archived /app/code/frappe-bench/archived \
\
&& mv /app/code/frappe-bench/logs /app/pkg/frappe-bench-orig/logs \
&& ln -sf /run/frappe/logs /app/code/frappe-bench/logs \
\
Expand Down Expand Up @@ -81,7 +86,11 @@ RUN mkdir -p /run/supervisor/logs \
&& ln -sf /run/nginx/error.log /var/log/nginx/error.log \
&& ln -s /app/data/frappe/config/nginx.conf /etc/nginx/sites-enabled/frappe

RUN ln -sf /run/.yarnrc /home/cloudron/.yarnrc
RUN ln -sf /run/.yarnrc /home/cloudron/.yarnrc && \
ln -sf /run/.yarn /home/cloudron/.yarn && \
ln -sf /run/.npm /home/cloudron/.npm && \
ln -sf /run/.local /home/cloudron/.local && \
ln -sf /run/.cache /home/cloudron/.cache

COPY nginx.conf setup-ldap.sh start.sh /app/pkg/

Expand Down
144 changes: 0 additions & 144 deletions README.md

This file was deleted.

2 changes: 0 additions & 2 deletions dev-scripts/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions dev-scripts/build-push-install.sh

This file was deleted.

14 changes: 0 additions & 14 deletions dev-scripts/docker-run-mysql.sh

This file was deleted.

11 changes: 0 additions & 11 deletions dev-scripts/docker-run-openldap.sh

This file was deleted.

18 changes: 0 additions & 18 deletions dev-scripts/docker-run-postgres.sh

This file was deleted.

34 changes: 0 additions & 34 deletions dev-scripts/docker-run.sh

This file was deleted.

6 changes: 1 addition & 5 deletions manifest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
v0.0.1
Add LDAP support


v0.0.1
Erpnext v14 initial release
Initial Release
2 changes: 1 addition & 1 deletion manifest/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Run [Erpnext](https://erpnext.com) on [Cloudron](https://cloudron.io).
Install [Frappe Framework](https://frappeframework.com) on [Cloudron](https://cloudron.io).

For now, it just works, if nothing goes wrong during installation.

Expand Down
Binary file modified manifest/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu pipefail
echo ">>>> Ensure runtime directories"
mkdir -p /run/nginx && chown -R cloudron:cloudron /run/nginx/
mkdir -p /run/supervisor/logs && chown -R cloudron:cloudron /run/supervisor/
mkdir -p /app/data/frappe/{env,config,sites,apps,logs}
mkdir -p /app/data/frappe/{env,config,sites,apps,logs,archived}
mkdir -p /run/frappe/logs
mkdir -p /app/data/mariadb
mkdir -p /run/mysqld/logs
Expand All @@ -13,6 +13,12 @@ mkdir -p /run/mysqld/logs

echo ">>>> Ensure yarn can run properly"
touch /run/.yarnrc && chown cloudron:cloudron /run/.yarnrc
touch /run/.npmrc && chown cloudron:cloudron /run/.npmrc

mkdir -p /run/.yarn && chown cloudron:cloudron /run/.yarn
mkdir -p /run/.npm && chown cloudron:cloudron /run/.npm
mkdir -p /run/.cache && chown cloudron:cloudron /run/.cache
mkdir -p /run/.local && chown cloudron:cloudron /run/.local

# Frappe Bench

Expand All @@ -22,6 +28,7 @@ if [[ ! -f /app/data/frappe/.initialized ]]; then
cp -R /app/pkg/frappe-bench-orig/config/* /app/data/frappe/config/
cp -R /app/pkg/frappe-bench-orig/sites/* /app/data/frappe/sites/
cp -R /app/pkg/frappe-bench-orig/apps/* /app/data/frappe/apps/
cp -R /app/pkg/frappe-bench-orig/archived/* /app/data/frappe/archived/
cp -n /app/pkg/frappe-bench-orig/patches.txt /app/data/frappe/patches.txt
cp -R /app/pkg/frappe-bench-orig/logs/* /run/frappe/logs/
touch /app/data/frappe/.initialized
Expand Down Expand Up @@ -87,9 +94,6 @@ if [[ ! -f "/app/data/frappe/sites/${DEFAULT_SITE}/.initialized" ]]; then
# Make sure frappe is installed by default on this site.
echo 'frappe' >/app/data/frappe/sites/apps.txt

# Fetch erpnext app (erpnext is not fetched in docker image to reduce size)
gosu cloudron bench get-app --branch ${ERPNEXT_VERSION} --resolve-deps erpnext

gosu cloudron:cloudron bench new-site \
--force \
--db-name "${DB_NAME}" \
Expand Down

0 comments on commit 6328eb1

Please sign in to comment.