Merge pull request #74 from keitaroinc/uswgi-start-proc-num-var
Uwsgi start proc num var
This commit is contained in:
commit
5a535df6a8
|
@ -4,9 +4,10 @@ on:
|
|||
push:
|
||||
branches: master
|
||||
|
||||
|
||||
jobs:
|
||||
build-ckan-2-9:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
|
|
@ -4,9 +4,10 @@ on:
|
|||
pull_request:
|
||||
branches: master
|
||||
|
||||
|
||||
jobs:
|
||||
build-ckan-2-9:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
@ -52,6 +53,8 @@ jobs:
|
|||
tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-9
|
||||
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-9
|
||||
build-args: |
|
||||
--progress=plain
|
||||
|
||||
build-ckan-2-8:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -13,7 +13,12 @@ then
|
|||
fi
|
||||
|
||||
# Set the common uwsgi options
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch"
|
||||
if [ ${UWSGI_PROC_NO} == "0" ] || [ ${UWSGI_PROC_NO} == "" ];
|
||||
then
|
||||
echo setting USWGI proc to 2
|
||||
${UWSGI_PROC_NO}=2
|
||||
fi
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO} -L --gevent-early-monkey-patch"
|
||||
|
||||
# Run the prerun script to init CKAN and create the default admin user
|
||||
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }
|
||||
|
|
|
@ -13,7 +13,12 @@ then
|
|||
fi
|
||||
|
||||
# Set the common uwsgi options
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch"
|
||||
if [ ${UWSGI_PROC_NO} == "0" ] || [ ${UWSGI_PROC_NO} == "" ];
|
||||
then
|
||||
echo setting USWGI proc to 2
|
||||
${UWSGI_PROC_NO}=2
|
||||
fi
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO} -L --gevent-early-monkey-patch"
|
||||
|
||||
# Run the prerun script to init CKAN and create the default admin user
|
||||
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }
|
||||
|
|
|
@ -60,7 +60,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uWSGI==2.0.20 gevent==21.1.2 greenlet==1.1.0
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -143,7 +143,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uWSGI==2.0.20 gevent==21.1.2
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN addgroup -g 92 -S ckan && \
|
||||
|
|
|
@ -81,7 +81,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uWSGI==2.0.20 gevent==21.1.2 greenlet==1.1.0
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -192,7 +192,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uWSGI==2.0.20 gevent==21.1.2
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN groupadd -g 92 ckan && \
|
||||
|
|
|
@ -13,7 +13,12 @@ then
|
|||
fi
|
||||
|
||||
# Set the common uwsgi options
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid ckan --gid ckan --http :5000 --master --enable-threads --wsgi-file /srv/app/wsgi.py --module wsgi:application --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch --vacuum --harakiri 50 --callable application"
|
||||
if [ ${UWSGI_PROC_NO} == "0" ] || [ ${UWSGI_PROC_NO} == "" ];
|
||||
then
|
||||
echo setting USWGI proc to 2
|
||||
${UWSGI_PROC_NO}=2
|
||||
fi
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid ckan --gid ckan --http :5000 --master --enable-threads --wsgi-file /srv/app/wsgi.py --module wsgi:application --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO} -L --gevent-early-monkey-patch --vacuum --harakiri 50 --callable application"
|
||||
|
||||
# Run the prerun script to init CKAN and create the default admin user
|
||||
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }
|
||||
|
|
Loading…
Reference in New Issue