From 7bca3dd30d0aa5fd923eeb88374a4be2fcdfcf0c Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Wed, 22 Apr 2020 17:56:08 -0400 Subject: [PATCH] docker: switch to using uwsgi-base This changes switches the Docker image to use the uwsgi-base image which have no changes in the consumption of the image. Depends-On: https://review.opendev.org/713953 Change-Id: Ia04425ca7bf22f0e9cc2dbe35daefa466c92dd56 --- .zuul.yaml | 6 ++---- Dockerfile | 8 ++------ requirements.txt | 1 - 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index f4ed851..f117dbb 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -19,8 +19,7 @@ parent: opendev-build-docker-image description: Build OpenDev Docker images for LodgeIt requires: - - python-base-3.7-container-image - - python-builder-3.7-container-image + - uwsgi-base-3.7-container-image provides: lodgeit-container-image vars: &lodgeit_opendev_image_vars zuul_work_dir: src/opendev.org/opendev/lodgeit @@ -34,8 +33,7 @@ parent: opendev-upload-docker-image description: Build OpenDev LodgeIt Docker images and upload to Docker Hub. requires: - - python-base-3.7-container-image - - python-builder-3.7-container-image + - uwsgi-base-3.7-container-image provides: lodgeit-container-image vars: *lodgeit_opendev_image_vars secrets: diff --git a/Dockerfile b/Dockerfile index 02160ec..d095d37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,15 +17,11 @@ FROM opendevorg/python-builder:3.7 as builder COPY . /tmp/src RUN assemble -FROM opendevorg/python-base:3.7 as lodgeit +FROM opendevorg/uwsgi-base:3.7 as lodgeit COPY --from=builder /output/ /output RUN /output/install-from-bindep -USER nobody EXPOSE 9000 ENV LODGEIT_DBURI sqlite:////tmp/lodgeit.db ENV LODGEIT_SECRET_KEY changeMe -CMD ["uwsgi", "--master", \ - "--processes", "4", \ - "--http-socket", "0.0.0.0:9000", \ - "--wsgi-file", "/usr/local/bin/lodgeit-wsgi"] +ENV UWSGI_HTTP_SOCKET=:9000 UWSGI_WSGI_FILE=/usr/local/bin/lodgeit-wsgi diff --git a/requirements.txt b/requirements.txt index 3f63568..04c3a7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,3 @@ Babel pillow pytz MarkupSafe -uwsgi