mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-23 10:38:58 +00:00
Adding in the rsync for the docker-entrypoint
This commit is contained in:
parent
f4e24e15a8
commit
48a305bec6
@ -7,6 +7,7 @@ RUN /install_app erpnext https://github.com/frappe/erpnext
|
||||
FROM frappe/frappe-assets:develop
|
||||
RUN cp /home/frappe/frappe-bench/sites/apps.txt /home/frappe/frappe-bench/sites/apps.bak
|
||||
COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
|
||||
COPY --from=0 /rsync /rsync
|
||||
RUN mv /home/frappe/frappe-bench/sites/apps.bak /home/frappe/frappe-bench/sites/apps.txt \
|
||||
&& echo -n "\nerpnext" >> /home/frappe/frappe-bench/sites/apps.txt
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Thanks
|
||||
# https://serverfault.com/a/919212
|
||||
##
|
||||
|
||||
set -e
|
||||
|
||||
rsync -a --delete /var/www/html/assets/js /assets
|
||||
rsync -a --delete /var/www/html/assets/css /assets
|
||||
rsync -a --delete /var/www/html/assets/frappe /assets
|
||||
rsync -a --delete /var/www/html/assets/erpnext /assets
|
||||
|
||||
chmod -R 755 /assets
|
||||
|
||||
if [[ -z "$FRAPPE_PY" ]]; then
|
||||
export FRAPPE_PY=0.0.0.0
|
||||
fi
|
||||
|
||||
if [[ -z "$FRAPPE_PY_PORT" ]]; then
|
||||
export FRAPPE_PY_PORT=8000
|
||||
fi
|
||||
|
||||
if [[ -z "$FRAPPE_SOCKETIO" ]]; then
|
||||
export FRAPPE_SOCKETIO=0.0.0.0
|
||||
fi
|
||||
|
||||
if [[ -z "$SOCKETIO_PORT" ]]; then
|
||||
export SOCKETIO_PORT=9000
|
||||
fi
|
||||
|
||||
envsubst '${API_HOST}
|
||||
${API_PORT}
|
||||
${FRAPPE_PY}
|
||||
${FRAPPE_PY_PORT}
|
||||
${FRAPPE_SOCKETIO}
|
||||
${SOCKETIO_PORT}' \
|
||||
< /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
|
||||
|
||||
exec "$@"
|
@ -27,3 +27,4 @@ yarn install --production=true
|
||||
mkdir -p /home/frappe/frappe-bench/sites/assets/${APP_NAME}
|
||||
cp -R /home/frappe/frappe-bench/apps/${APP_NAME}/${APP_NAME}/public/* /home/frappe/frappe-bench/sites/assets/${APP_NAME}
|
||||
|
||||
echo "rsync -a --delete /var/www/html/assets/${APP_NAME} /assets" > /rsync
|
@ -7,6 +7,7 @@ RUN /install_app erpnext https://github.com/frappe/erpnext version-11
|
||||
FROM frappe/frappe-assets:v11
|
||||
RUN cp /home/frappe/frappe-bench/sites/apps.txt /home/frappe/frappe-bench/sites/apps.bak
|
||||
COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
|
||||
COPY --from=0 /rsync /rsync
|
||||
RUN mv /home/frappe/frappe-bench/sites/apps.bak /home/frappe/frappe-bench/sites/apps.txt \
|
||||
&& echo -n "\nerpnext" >> /home/frappe/frappe-bench/sites/apps.txt
|
||||
|
||||
|
@ -7,6 +7,7 @@ RUN /install_app erpnext https://github.com/frappe/erpnext version-12
|
||||
FROM frappe/frappe-assets:v12
|
||||
RUN cp /home/frappe/frappe-bench/sites/apps.txt /home/frappe/frappe-bench/sites/apps.bak
|
||||
COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
|
||||
COPY --from=0 /rsync /rsync
|
||||
RUN mv /home/frappe/frappe-bench/sites/apps.bak /home/frappe/frappe-bench/sites/apps.txt \
|
||||
&& echo -n "\nerpnext" >> /home/frappe/frappe-bench/sites/apps.txt
|
||||
VOLUME [ "/assets" ]
|
||||
|
@ -9,6 +9,7 @@ set -e
|
||||
rsync -a --delete /var/www/html/assets/js /assets
|
||||
rsync -a --delete /var/www/html/assets/css /assets
|
||||
rsync -a --delete /var/www/html/assets/frappe /assets
|
||||
. /rsync
|
||||
|
||||
chmod -R 755 /assets
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user