update FRAPPE to JINGROW

This commit is contained in:
jingrow 2025-12-23 23:17:43 +08:00
parent 13527566c1
commit 3b870133aa
4 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
; priority=1 --> Lower priorities indicate programs that start first and shut down last
; killasgroup=true --> send kill signal to child processes too
[supervisord]
environment=PYTHONUNBUFFERED="1", SENTRY_DSN="https://0b59ca68d333c62aa1f4b4f47fc0b9e5@sentry.jingrow.cloud/2", FRAPPE_SENTRY_DSN="https://0b59ca68d333c62aa1f4b4f47fc0b9e5@sentry.jingrow.cloud/2", PATH="/home/jingrow/.local/bin:/home/jingrow/.nvm/versions/node/v18.17.1/bin:/home/jingrow/.pyenv/plugins/pyenv-virtualenv/shims:/home/jingrow/.pyenv/shims:/home/jingrow/.pyenv/bin::%(ENV_PATH)s", SENTRY_TRACING_SAMPLE_RATE="1", ENABLE_SENTRY_DB_MONITORING="1"
environment=PYTHONUNBUFFERED="1", SENTRY_DSN="https://0b59ca68d333c62aa1f4b4f47fc0b9e5@sentry.jingrow.cloud/2", JINGROW_SENTRY_DSN="https://0b59ca68d333c62aa1f4b4f47fc0b9e5@sentry.jingrow.cloud/2", PATH="/home/jingrow/.local/bin:/home/jingrow/.nvm/versions/node/v18.17.1/bin:/home/jingrow/.pyenv/plugins/pyenv-virtualenv/shims:/home/jingrow/.pyenv/shims:/home/jingrow/.pyenv/bin::%(ENV_PATH)s", SENTRY_TRACING_SAMPLE_RATE="1", ENABLE_SENTRY_DB_MONITORING="1"
; graceful timeout should always be lower than stopwaitsecs to avoid orphan gunicorn workers.
[program:jingrow-bench-jingrow-web]
@ -38,7 +38,7 @@ user=jingrow
stopwaitsecs=360
directory=/home/jingrow/jingrow-bench
killasgroup=true
environment=FRAPPE_BACKGROUND_WORKERS_NOFORK="True"
environment=JINGROW_BACKGROUND_WORKERS_NOFORK="True"
process_name=%(program_name)s
[program:jingrow-bench-jingrow-short-worker]
@ -52,7 +52,7 @@ user=jingrow
stopwaitsecs=360
directory=/home/jingrow/jingrow-bench
killasgroup=true
environment=FRAPPE_BACKGROUND_WORKERS_NOFORK="True"
environment=JINGROW_BACKGROUND_WORKERS_NOFORK="True"
process_name=%(program_name)s
@ -67,7 +67,7 @@ user=jingrow
stopwaitsecs=1560
directory=/home/jingrow/jingrow-bench
killasgroup=true
environment=FRAPPE_BACKGROUND_WORKERS_NOFORK="True"
environment=JINGROW_BACKGROUND_WORKERS_NOFORK="True"
process_name=%(program_name)s
@ -82,7 +82,7 @@ user=jingrow
stopwaitsecs=1560
directory=/home/jingrow/jingrow-bench
killasgroup=true
environment=FRAPPE_BACKGROUND_WORKERS_NOFORK="True"
environment=JINGROW_BACKGROUND_WORKERS_NOFORK="True"
process_name=%(program_name)s

View File

@ -1,7 +1,7 @@
# syntax = docker/dockerfile:experimental
FROM ubuntu:22.04
ENV FRAPPE_DOCKER_BUILD True
ENV JINGROW_DOCKER_BUILD True
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
@ -280,8 +280,8 @@ RUN mkdir -p {{ m.destination }} && \
`#stage-mounts-create`
{% endfor %}
ENV FRAPPE_DOCKER_BUILD=
ENV FRAPPE_HARD_LINK_ASSETS True
ENV JINGROW_DOCKER_BUILD=
ENV JINGROW_HARD_LINK_ASSETS True
ENV HISTTIMEFORMAT "%Y-%m-%d %T "
EXPOSE 8000 9000 2200 8088

View File

@ -170,7 +170,7 @@ RUN --mount=type=cache,target=/home/jingrow/.cache,uid=1000,gid=1000 --mount=typ
COPY --chown=jingrow:jingrow config /home/jingrow/jingrow-bench/config
COPY --chown=jingrow:jingrow apps.txt /home/jingrow/jingrow-bench/sites/apps.txt
ENV FRAPPE_HARD_LINK_ASSETS True
ENV JINGROW_HARD_LINK_ASSETS True
EXPOSE 8000 8088 9000 2200
CMD ["supervisord"]

View File

@ -114,7 +114,7 @@ def cleanup_ansible_tmp_files():
threshold = time.time() - 60 * 60 # >One hour old
if os.environ.get("FRAPPE_BACKGROUND_WORKERS_NOFORK"):
if os.environ.get("JINGROW_BACKGROUND_WORKERS_NOFORK"):
# Long running processes, don't cleanup
threshold = time.time() - 2 * 24 * 60 * 60 # >2 days old