Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
5601d97782 |
23
build.sh
Executable file
23
build.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export APPS_JSON='[
|
||||||
|
{
|
||||||
|
"url": "https://githaven.org/Shiloh/brotherton-erpnext",
|
||||||
|
"branch": "production"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/frappe/hrms",
|
||||||
|
"branch": "v15.15.0"
|
||||||
|
}
|
||||||
|
]'
|
||||||
|
export APPS_JSON_BASE64=$(echo ${APPS_JSON} | base64 -w 0)
|
||||||
|
export TAG=1.0.1 # Change this
|
||||||
|
docker build --platform=linux/amd64 \
|
||||||
|
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
|
||||||
|
--build-arg=FRAPPE_BRANCH=v15.15.0 \
|
||||||
|
--build-arg=PYTHON_VERSION=3.11.6 \
|
||||||
|
--build-arg=NODE_VERSION=18.18.2 \
|
||||||
|
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
|
||||||
|
--tag=githaven.org/shiloh/frappe_docker:$TAG \
|
||||||
|
--file=images/custom/Containerfile .
|
||||||
|
docker push githaven.org/shiloh/frappe_docker:$TAG
|
@ -27,6 +27,8 @@ services:
|
|||||||
command:
|
command:
|
||||||
- >
|
- >
|
||||||
ls -1 apps > sites/apps.txt;
|
ls -1 apps > sites/apps.txt;
|
||||||
|
rm -rf sites/assets || true;
|
||||||
|
ln -s /home/frappe/frappe-bench/assets sites/assets || true;
|
||||||
bench set-config -g db_host $$DB_HOST;
|
bench set-config -g db_host $$DB_HOST;
|
||||||
bench set-config -gp db_port $$DB_PORT;
|
bench set-config -gp db_port $$DB_PORT;
|
||||||
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
|
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
|
||||||
|
@ -131,11 +131,9 @@ COPY --from=builder --chown=frappe:frappe /home/frappe/frappe-bench /home/frappe
|
|||||||
|
|
||||||
WORKDIR /home/frappe/frappe-bench
|
WORKDIR /home/frappe/frappe-bench
|
||||||
|
|
||||||
VOLUME [ \
|
# Move the generated assets folder out of the "sites" folder, which will be attached to a volume and thus persisted
|
||||||
"/home/frappe/frappe-bench/sites", \
|
# So that it can be referenced by symlink even after "sites" is replaced with the volume
|
||||||
"/home/frappe/frappe-bench/sites/assets", \
|
RUN mv /home/frappe/frappe-bench/sites/assets /home/frappe/frappe-bench/assets
|
||||||
"/home/frappe/frappe-bench/logs" \
|
|
||||||
]
|
|
||||||
|
|
||||||
CMD [ \
|
CMD [ \
|
||||||
"/home/frappe/frappe-bench/env/bin/gunicorn", \
|
"/home/frappe/frappe-bench/env/bin/gunicorn", \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user