diff --git a/.github/workflows/master_merge.yml b/.github/workflows/master_merge.yml index af3ac68..37aaf2d 100644 --- a/.github/workflows/master_merge.yml +++ b/.github/workflows/master_merge.yml @@ -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 diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 092597c..4619032 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -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 diff --git a/images/ckan/2.7/setup/app/start_ckan.sh b/images/ckan/2.7/setup/app/start_ckan.sh index a0bc80d..8dcc548 100755 --- a/images/ckan/2.7/setup/app/start_ckan.sh +++ b/images/ckan/2.7/setup/app/start_ckan.sh @@ -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; } diff --git a/images/ckan/2.8/setup/app/start_ckan.sh b/images/ckan/2.8/setup/app/start_ckan.sh index a0bc80d..8dcc548 100755 --- a/images/ckan/2.8/setup/app/start_ckan.sh +++ b/images/ckan/2.8/setup/app/start_ckan.sh @@ -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; } diff --git a/images/ckan/2.9/Dockerfile b/images/ckan/2.9/Dockerfile index d68240e..0a054be 100644 --- a/images/ckan/2.9/Dockerfile +++ b/images/ckan/2.9/Dockerfile @@ -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 && \ diff --git a/images/ckan/2.9/Dockerfile.focal b/images/ckan/2.9/Dockerfile.focal index c8edbcb..569340b 100644 --- a/images/ckan/2.9/Dockerfile.focal +++ b/images/ckan/2.9/Dockerfile.focal @@ -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 && \ diff --git a/images/ckan/2.9/setup/app/start_ckan.sh b/images/ckan/2.9/setup/app/start_ckan.sh index fee6dad..c55474a 100755 --- a/images/ckan/2.9/setup/app/start_ckan.sh +++ b/images/ckan/2.9/setup/app/start_ckan.sh @@ -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; }