From a166c431b3f94b31e4c69e14a7c78620d181b25f Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Wed, 11 Dec 2024 23:47:41 +0000 Subject: [PATCH 01/22] Deploying to ElasticBeanstalk --- .github/workflows/deploy.yml | 41 ++++++++++++++++++++++++++++++++++++ .travis.yml | 14 ------------ 2 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..518587a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: deploy-to-eb + +on: + push: + branches: [ main ] + +env: + ELASTIC_BEANSTALK_NAME: iiif-website-validators + ELASTIC_BEANSTALK_ENV_NAME: iiif-image-validator-python-3 + BUCKET: codepipeline-us-east-1-740788099428 + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Create ZIP deployment package + run: zip -r ${{github.run_id}}.zip ./ + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }} + aws-region: "us-east-1" + + - name: Upload package to S3 bucket + run: aws s3 cp ${{github.run_id}}.zip s3://$BUCKET/iiif-image-validator/MyApp/ + + - name: Create new ElasticBeanstalk Application Version + run: | + aws elasticbeanstalk create-application-version \ + --application-name $ELASTIC_BEANSTALK_NAME \ + --source-bundle S3Bucket=$BUCKET, S3Key="iiif-image-validator/MyApp/${{github.run_id}}.zip" \ + --version-label "ver-${{ github.sha }}" \ + --description "commit-sha-${{ github.sha }}" + + - name: Deploy new ElasticBeanstalk Application Version + run: aws elasticbeanstalk update-environment --environment-name $ELASTIC_BEANSTALK_ENV_NAME --version-label "ver-${{ github.sha }}" \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c1aa3d3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: python -python: - - "2.7" - - "3.5" - - "3.6" -install: - - pip install tox tox-travis coveralls - - pip install setuptools -U - - python setup.py install -script: - - tox -after_success: - - coverage run --source=iiif_validator setup.py test - - coveralls From 01636febaac371f569e7fb1840d8caf35f17db59 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Wed, 11 Dec 2024 23:48:33 +0000 Subject: [PATCH 02/22] Testing on deploy branch --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 518587a..c929786 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: deploy-to-eb on: push: - branches: [ main ] + branches: [ deploy ] env: ELASTIC_BEANSTALK_NAME: iiif-website-validators From 887acb0c555635b1145c357e45e549706d1af2f8 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 00:47:53 +0000 Subject: [PATCH 03/22] Adding encryption --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c929786..22b1749 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,20 +14,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Create ZIP deployment package run: zip -r ${{github.run_id}}.zip ./ - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }} aws-region: "us-east-1" - name: Upload package to S3 bucket - run: aws s3 cp ${{github.run_id}}.zip s3://$BUCKET/iiif-image-validator/MyApp/ + run: aws s3 cp ${{github.run_id}}.zip s3://$BUCKET/iiif-image-validator/MyApp/ --sse aws:kms - name: Create new ElasticBeanstalk Application Version run: | From 1ae4cfa7dca76ff7b100c5d1c4411ecf624130bb Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 00:53:58 +0000 Subject: [PATCH 04/22] Removing space --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 22b1749..a73fa39 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,7 +33,7 @@ jobs: run: | aws elasticbeanstalk create-application-version \ --application-name $ELASTIC_BEANSTALK_NAME \ - --source-bundle S3Bucket=$BUCKET, S3Key="iiif-image-validator/MyApp/${{github.run_id}}.zip" \ + --source-bundle S3Bucket=$BUCKET,S3Key="iiif-image-validator/MyApp/${{github.run_id}}.zip" \ --version-label "ver-${{ github.sha }}" \ --description "commit-sha-${{ github.sha }}" From 8340481ad5c9714178a4edfe26cd4af05572a627 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 00:59:46 +0000 Subject: [PATCH 05/22] Testing deploy --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a73fa39..c47eb60 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,6 +26,7 @@ jobs: aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }} aws-region: "us-east-1" + # This bucket needs to be encrypted - name: Upload package to S3 bucket run: aws s3 cp ${{github.run_id}}.zip s3://$BUCKET/iiif-image-validator/MyApp/ --sse aws:kms From e1f7b8d890e0d3665ec464418422d157a036897d Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 01:05:34 +0000 Subject: [PATCH 06/22] Forcing new deploy --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c47eb60..4043522 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,5 +38,6 @@ jobs: --version-label "ver-${{ github.sha }}" \ --description "commit-sha-${{ github.sha }}" + # deploy application - name: Deploy new ElasticBeanstalk Application Version run: aws elasticbeanstalk update-environment --environment-name $ELASTIC_BEANSTALK_ENV_NAME --version-label "ver-${{ github.sha }}" \ No newline at end of file From f4e911830068ad668ae559686f66a20faa64f286 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 01:40:05 +0000 Subject: [PATCH 07/22] Forcing update --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4043522..4964fe2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,6 +19,7 @@ jobs: - name: Create ZIP deployment package run: zip -r ${{github.run_id}}.zip ./ + # Configuring credentials - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: From 22cbb18373828a055b0940977661c4c933364054 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 02:14:01 +0000 Subject: [PATCH 08/22] Removing pip update --- .ebextensions/pip.config | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .ebextensions/pip.config diff --git a/.ebextensions/pip.config b/.ebextensions/pip.config deleted file mode 100644 index a3895be..0000000 --- a/.ebextensions/pip.config +++ /dev/null @@ -1,3 +0,0 @@ -commands: - update_pip: - command: "/opt/python/run/venv/bin/pip install --upgrade pip" From fac6c192bbb2c7f7547f4145dce14bbdaa00b5d0 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 02:48:51 +0000 Subject: [PATCH 09/22] trying to build lxml --- .ebextensions/pip.config | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .ebextensions/pip.config diff --git a/.ebextensions/pip.config b/.ebextensions/pip.config new file mode 100644 index 0000000..d1ea02b --- /dev/null +++ b/.ebextensions/pip.config @@ -0,0 +1,3 @@ +commands: + update_pip: + command: "pip install --upgrade pip && pip install --trusted-host pypi.org --trusted-host pypi.python.org lxml" \ No newline at end of file From 97c7e1437ed846ebdfb5f3ab567bbe37c77a032e Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 02:59:26 +0000 Subject: [PATCH 10/22] updating pip --- .ebextensions/pip.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ebextensions/pip.config b/.ebextensions/pip.config index d1ea02b..0e4ffec 100644 --- a/.ebextensions/pip.config +++ b/.ebextensions/pip.config @@ -1,3 +1,3 @@ commands: update_pip: - command: "pip install --upgrade pip && pip install --trusted-host pypi.org --trusted-host pypi.python.org lxml" \ No newline at end of file + command: "/opt/python/run/venv/bin/pip install --upgrade pip && /opt/python/run/venv/bin/pip install --trusted-host pypi.org --trusted-host pypi.python.org lxml" \ No newline at end of file From 7d0570391ce90545e7c61766ba601d4dd0b59440 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 03:10:10 +0000 Subject: [PATCH 11/22] Updating pip --- .ebextensions/pip.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ebextensions/pip.config b/.ebextensions/pip.config index 0e4ffec..3ee000b 100644 --- a/.ebextensions/pip.config +++ b/.ebextensions/pip.config @@ -1,3 +1,3 @@ commands: update_pip: - command: "/opt/python/run/venv/bin/pip install --upgrade pip && /opt/python/run/venv/bin/pip install --trusted-host pypi.org --trusted-host pypi.python.org lxml" \ No newline at end of file + command: "/opt/python/run/venv/bin/pip install --trusted-host pypi.org --trusted-host pypi.python.org --upgrade pip" \ No newline at end of file From ceeacd5d84acb2e78a53b7e9d666bd1ba68060ed Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 03:28:17 +0000 Subject: [PATCH 12/22] Pinning bottle for python v3.6 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2685be0..a193191 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ lxml -bottle +bottle<0.13 python-magic pillow mock From 6103a0e551b860a36cf0c540f650ddb404f10ceb Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 13:29:16 +0000 Subject: [PATCH 13/22] Handling pip3.6 and 3.12 --- .ebextensions/pip.config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ebextensions/pip.config b/.ebextensions/pip.config index 3ee000b..d8e7a68 100644 --- a/.ebextensions/pip.config +++ b/.ebextensions/pip.config @@ -1,3 +1,4 @@ commands: update_pip: - command: "/opt/python/run/venv/bin/pip install --trusted-host pypi.org --trusted-host pypi.python.org --upgrade pip" \ No newline at end of file + command: "/opt/python/run/venv/bin/pip install --trusted-host pypi.org --trusted-host pypi.python.org --upgrade pip" + test: "[ -x test: /opt/python/run/venv/bin/pip ]" \ No newline at end of file From b007507bb691f6aac6b0fad8128b79b06b87467b Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 14:39:12 +0000 Subject: [PATCH 14/22] Forcing depoly --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4964fe2..4773f08 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,6 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 + # creating zip file - name: Create ZIP deployment package run: zip -r ${{github.run_id}}.zip ./ From ef95826d49463924c457e08a34db061a5d0f0f7a Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 14:50:02 +0000 Subject: [PATCH 15/22] Forcing deploy --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4773f08..9364fc6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,7 @@ on: env: ELASTIC_BEANSTALK_NAME: iiif-website-validators ELASTIC_BEANSTALK_ENV_NAME: iiif-image-validator-python-3 + # Bucket where source is stored for ElasticBeanstalk BUCKET: codepipeline-us-east-1-740788099428 jobs: From 65830cdb5fa2fae16ab16ded34bc9297d64301ae Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 22:18:47 +0000 Subject: [PATCH 16/22] Fixing test --- .ebextensions/pip.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ebextensions/pip.config b/.ebextensions/pip.config index d8e7a68..d73df6e 100644 --- a/.ebextensions/pip.config +++ b/.ebextensions/pip.config @@ -1,4 +1,4 @@ commands: update_pip: command: "/opt/python/run/venv/bin/pip install --trusted-host pypi.org --trusted-host pypi.python.org --upgrade pip" - test: "[ -x test: /opt/python/run/venv/bin/pip ]" \ No newline at end of file + test: "[ -x /opt/python/run/venv/bin/pip ]" \ No newline at end of file From a0a3cc8961eee22929d57a1f47947fc541117143 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 22:46:39 +0000 Subject: [PATCH 17/22] Adding mod_wsgi as later version don't have it --- .ebextensions/01_apache_wsgi.config | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .ebextensions/01_apache_wsgi.config diff --git a/.ebextensions/01_apache_wsgi.config b/.ebextensions/01_apache_wsgi.config new file mode 100644 index 0000000..e69de29 From a8d4259bd5519d2f422b6dd3f89382db0b446701 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 23:19:03 +0000 Subject: [PATCH 18/22] Setting up nginx wsgi --- .ebextensions/01_apache_wsgi.config | 0 Procfile | 1 + 2 files changed, 1 insertion(+) delete mode 100644 .ebextensions/01_apache_wsgi.config create mode 100644 Procfile diff --git a/.ebextensions/01_apache_wsgi.config b/.ebextensions/01_apache_wsgi.config deleted file mode 100644 index e69de29..0000000 diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..f545702 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: uwsgi --http :8000 --wsgi-file iiif-validator.py --master --processes 4 --threads 2 \ No newline at end of file From e180c67618bada704f4d636810bd5e461969dc44 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 12 Dec 2024 23:37:46 +0000 Subject: [PATCH 19/22] Adding uwsgi for deployment --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a193191..67404b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ bottle<0.13 python-magic pillow mock -setuptools \ No newline at end of file +setuptools +uwsgi \ No newline at end of file From 380fb849f37be6c1452bf7604512c2bfae9e2299 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Fri, 13 Dec 2024 00:29:51 +0000 Subject: [PATCH 20/22] Removing apache config as using nginx --- .ebextensions/http/conf.d/dontlog.conf | 19 -- .ebextensions/http/conf/httpd.conf | 353 ------------------------- .ebextensions/pip.config | 4 - .ebextensions/wsgi.config | 3 - 4 files changed, 379 deletions(-) delete mode 100644 .ebextensions/http/conf.d/dontlog.conf delete mode 100644 .ebextensions/http/conf/httpd.conf delete mode 100644 .ebextensions/pip.config delete mode 100644 .ebextensions/wsgi.config diff --git a/.ebextensions/http/conf.d/dontlog.conf b/.ebextensions/http/conf.d/dontlog.conf deleted file mode 100644 index d99a19d..0000000 --- a/.ebextensions/http/conf.d/dontlog.conf +++ /dev/null @@ -1,19 +0,0 @@ -RewriteEngine On -RedirectMatch ^/$ https://iiif.io/api/image/validator/ - -SetEnvIf Request_URI "^/glen_test.html$" dontlog -SetEnvIf Request_URI "^/Nmap/.*$" dontlog -SetEnvIf Request_URI "^/.*Yealink.*$" dontlog -SetEnvIf Request_URI "^/.*.php$" dontlog -SetEnvIf Request_URI "^/.*.cfg$" dontlog -SetEnvIf Request_URI "^/.*.aspx$" dontlog -SetEnvIf Request_URI "^/manager/html$" dontlog -SetEnvIf Request_URI "^/.well-known/security.txt$" dontlog -SetEnvIf Request_URI "^/js/czjl.js$" dontlog -SetEnvIf Request_URI "^/data/admin/.*$" dontlog -SetEnvIf Request_URI "^/sdk$" dontlog -SetEnvIf Request_URI "^/graphs/$" dontlog -SetEnvIf Request_URI "^/english/$" dontlog -SetEnvIf Request_URI "^/evox/about$" dontlog -SetEnvIf Request_URI "^/v3.0/web/assets/css/site.css$" dontlog -SetEnvIf Request_URI "^/user/register/$" dontlog diff --git a/.ebextensions/http/conf/httpd.conf b/.ebextensions/http/conf/httpd.conf deleted file mode 100644 index 98696a5..0000000 --- a/.ebextensions/http/conf/httpd.conf +++ /dev/null @@ -1,353 +0,0 @@ -# -# This is the main Apache HTTP server configuration file. It contains the -# configuration directives that give the server its instructions. -# See for detailed information. -# In particular, see -# -# for a discussion of each configuration directive. -# -# Do NOT simply read the instructions in here without understanding -# what they do. They're here only as hints or reminders. If you are unsure -# consult the online docs. You have been warned. -# -# Configuration and logfile names: If the filenames you specify for many -# of the server's control files begin with "/" (or "drive:/" for Win32), the -# server will use that explicit path. If the filenames do *not* begin -# with "/", the value of ServerRoot is prepended -- so 'log/access_log' -# with ServerRoot set to '/www' will be interpreted by the -# server as '/www/log/access_log', where as '/log/access_log' will be -# interpreted as '/log/access_log'. - -# -# ServerRoot: The top of the directory tree under which the server's -# configuration, error, and log files are kept. -# -# Do not add a slash at the end of the directory path. If you point -# ServerRoot at a non-local disk, be sure to specify a local disk on the -# Mutex directive, if file-based mutexes are used. If you wish to share the -# same ServerRoot for multiple httpd daemons, you will need to change at -# least PidFile. -# -ServerRoot "/etc/httpd" - -# -# Listen: Allows you to bind Apache to specific IP addresses and/or -# ports, instead of the default. See also the -# directive. -# -# Change this to Listen on specific IP addresses as shown below to -# prevent Apache from glomming onto all bound IP addresses. -# -#Listen 12.34.56.78:80 -Listen 80 - -# -# Dynamic Shared Object (DSO) Support -# -# To be able to use the functionality of a module which was built as a DSO you -# have to place corresponding `LoadModule' lines at this location so the -# directives contained in it are actually available _before_ they are used. -# Statically compiled modules (those listed by `httpd -l') do not need -# to be loaded here. -# -# Example: -# LoadModule foo_module modules/mod_foo.so -# -Include conf.modules.d/*.conf - -# -# If you wish httpd to run as a different user or group, you must run -# httpd as root initially and it will switch. -# -# User/Group: The name (or #number) of the user/group to run httpd as. -# It is usually good practice to create a dedicated user and group for -# running httpd, as with most system services. -# -User apache -Group apache - -# 'Main' server configuration -# -# The directives in this section set up the values used by the 'main' -# server, which responds to any requests that aren't handled by a -# definition. These values also provide defaults for -# any containers you may define later in the file. -# -# All of these directives may appear inside containers, -# in which case these default settings will be overridden for the -# virtual host being defined. -# - -# -# ServerAdmin: Your address, where problems with the server should be -# e-mailed. This address appears on some server-generated pages, such -# as error documents. e.g. admin@your-domain.com -# -ServerAdmin root@localhost - -# -# ServerName gives the name and port that the server uses to identify itself. -# This can often be determined automatically, but we recommend you specify -# it explicitly to prevent problems during startup. -# -# If your host doesn't have a registered DNS name, enter its IP address here. -# -#ServerName www.example.com:80 - -# -# Deny access to the entirety of your server's filesystem. You must -# explicitly permit access to web content directories in other -# blocks below. -# - - AllowOverride none - Require all denied - - -# -# Note that from this point forward you must specifically allow -# particular features to be enabled - so if something's not working as -# you might expect, make sure that you have specifically enabled it -# below. -# - -# -# DocumentRoot: The directory out of which you will serve your -# documents. By default, all requests are taken from this directory, but -# symbolic links and aliases may be used to point to other locations. -# -DocumentRoot "/var/www/html" - -# -# Relax access to content within /var/www. -# - - AllowOverride None - # Allow open access: - Require all granted - - -# Further relax access to the default document root: - - # - # Possible values for the Options directive are "None", "All", - # or any combination of: - # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews - # - # Note that "MultiViews" must be named *explicitly* --- "Options All" - # doesn't give it to you. - # - # The Options directive is both complicated and important. Please see - # http://httpd.apache.org/docs/2.4/mod/core.html#options - # for more information. - # - Options Indexes FollowSymLinks - - # - # AllowOverride controls what directives may be placed in .htaccess files. - # It can be "All", "None", or any combination of the keywords: - # Options FileInfo AuthConfig Limit - # - AllowOverride None - - # - # Controls who can get stuff from this server. - # - Require all granted - - -# -# DirectoryIndex: sets the file that Apache will serve if a directory -# is requested. -# - - DirectoryIndex index.html - - -# -# The following lines prevent .htaccess and .htpasswd files from being -# viewed by Web clients. -# - - Require all denied - - -# -# ErrorLog: The location of the error log file. -# If you do not specify an ErrorLog directive within a -# container, error messages relating to that virtual host will be -# logged here. If you *do* define an error logfile for a -# container, that host's errors will be logged there and not here. -# -ErrorLog "logs/error_log" - -# -# LogLevel: Control the number of messages logged to the error_log. -# Possible values include: debug, info, notice, warn, error, crit, -# alert, emerg. -# -LogLevel warn - - - # - # The following directives define some format nicknames for use with - # a CustomLog directive (see below). - # - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined - LogFormat "%h %l %u %t \"%r\" %>s %b" common - - - # You need to enable mod_logio.c to use %I and %O - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio - - - # - # The location and format of the access logfile (Common Logfile Format). - # If you do not define any access logfiles within a - # container, they will be logged here. Contrariwise, if you *do* - # define per- access logfiles, transactions will be - # logged therein and *not* in this file. - # - #CustomLog "logs/access_log" common - - # - # If you prefer a logfile with access, agent, and referer information - # (Combined Logfile Format) you can use the following directive. - # - CustomLog "logs/access_log" combined env=!dontlog - - - - # - # Redirect: Allows you to tell clients about documents that used to - # exist in your server's namespace, but do not anymore. The client - # will make a new request for the document at its new location. - # Example: - # Redirect permanent /foo http://www.example.com/bar - - # - # Alias: Maps web paths into filesystem paths and is used to - # access content that does not live under the DocumentRoot. - # Example: - # Alias /webpath /full/filesystem/path - # - # If you include a trailing / on /webpath then the server will - # require it to be present in the URL. You will also likely - # need to provide a section to allow access to - # the filesystem path. - - # - # ScriptAlias: This controls which directories contain server scripts. - # ScriptAliases are essentially the same as Aliases, except that - # documents in the target directory are treated as applications and - # run by the server when requested rather than as documents sent to the - # client. The same rules about trailing "/" apply to ScriptAlias - # directives as to Alias. - # - ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" - - - -# -# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased -# CGI directory exists, if you have that configured. -# - - AllowOverride None - Options None - Require all granted - - - - # - # TypesConfig points to the file containing the list of mappings from - # filename extension to MIME-type. - # - TypesConfig /etc/mime.types - - # - # AddType allows you to add to or override the MIME configuration - # file specified in TypesConfig for specific file types. - # - #AddType application/x-gzip .tgz - # - # AddEncoding allows you to have certain browsers uncompress - # information on the fly. Note: Not all browsers support this. - # - #AddEncoding x-compress .Z - #AddEncoding x-gzip .gz .tgz - # - # If the AddEncoding directives above are commented-out, then you - # probably should define those extensions to indicate media types: - # - AddType application/x-compress .Z - AddType application/x-gzip .gz .tgz - - # - # AddHandler allows you to map certain file extensions to "handlers": - # actions unrelated to filetype. These can be either built into the server - # or added with the Action directive (see below) - # - # To use CGI scripts outside of ScriptAliased directories: - # (You will also need to add "ExecCGI" to the "Options" directive.) - # - #AddHandler cgi-script .cgi - - # For type maps (negotiated resources): - #AddHandler type-map var - - # - # Filters allow you to process content before it is sent to the client. - # - # To parse .shtml files for server-side includes (SSI): - # (You will also need to add "Includes" to the "Options" directive.) - # - AddType text/html .shtml - AddOutputFilter INCLUDES .shtml - - -# -# Specify a default charset for all content served; this enables -# interpretation of all content as UTF-8 by default. To use the -# default browser choice (ISO-8859-1), or to allow the META tags -# in HTML content to override this choice, comment out this -# directive: -# -AddDefaultCharset UTF-8 - - - # - # The mod_mime_magic module allows the server to use various hints from the - # contents of the file itself to determine its type. The MIMEMagicFile - # directive tells the module where the hint definitions are located. - # - MIMEMagicFile conf/magic - - -# -# Customizable error responses come in three flavors: -# 1) plain text 2) local redirects 3) external redirects -# -# Some examples: -#ErrorDocument 500 "The server made a boo boo." -#ErrorDocument 404 /missing.html -#ErrorDocument 404 "/cgi-bin/missing_handler.pl" -#ErrorDocument 402 http://www.example.com/subscription_info.html -# - -# -# EnableMMAP and EnableSendfile: On systems that support it, -# memory-mapping or the sendfile syscall may be used to deliver -# files. This usually improves server performance, but must -# be turned off when serving from networked-mounted -# filesystems or if support for these functions is otherwise -# broken on your system. -# Defaults if commented: EnableMMAP On, EnableSendfile Off -# -#EnableMMAP off -EnableSendfile on - -# Supplemental configuration -# -# Load config files in the "/etc/httpd/conf.d" directory, if any. -IncludeOptional conf.d/*.conf diff --git a/.ebextensions/pip.config b/.ebextensions/pip.config deleted file mode 100644 index d73df6e..0000000 --- a/.ebextensions/pip.config +++ /dev/null @@ -1,4 +0,0 @@ -commands: - update_pip: - command: "/opt/python/run/venv/bin/pip install --trusted-host pypi.org --trusted-host pypi.python.org --upgrade pip" - test: "[ -x /opt/python/run/venv/bin/pip ]" \ No newline at end of file diff --git a/.ebextensions/wsgi.config b/.ebextensions/wsgi.config deleted file mode 100644 index 8299845..0000000 --- a/.ebextensions/wsgi.config +++ /dev/null @@ -1,3 +0,0 @@ -option_settings: - aws:elasticbeanstalk:container:python: - WSGIPath: iiif-validator.py From 5ea6b583640e41f69dea9c6ca876f1e1ef440226 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Fri, 13 Dec 2024 00:37:34 +0000 Subject: [PATCH 21/22] Running only on main --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9364fc6..c32f5d6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: deploy-to-eb on: push: - branches: [ deploy ] + branches: [ main ] env: ELASTIC_BEANSTALK_NAME: iiif-website-validators From 2ce10e54c0f2ab92b65bedccb22e32c29642a156 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Fri, 13 Dec 2024 00:37:46 +0000 Subject: [PATCH 22/22] Dropping python 3.6 support --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 67404b6..9cd9e12 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ lxml -bottle<0.13 +bottle python-magic pillow mock