Skip to content

Conversation

@melton-jason
Copy link
Contributor

@melton-jason melton-jason commented Oct 7, 2025

Fixes #34, #26
Might fix #9 (included in testing instructions. I did my own testing and did not run into any errors: it would appear that ImageMagick fixed their default policy.xml).
Includes required packages for #38 (see related #36)

This PR seeks to:

A list of updated and installed software for this PR is provided below:

Library / Software Old Version New Version Old Version Notes New Version Notes
Ubuntu 18.04 22.04 EOL May 2023 EOL Apr 2027
Python 3.6 3.12 EOL Dec 2023 (Latest Security) EOL Oct 2028
ExifRead 2.3.1 3.5.1 Released Aug 7, 2020 (Latest) Released Aug 23, 2025
Paste 3.4.4 3.10.1 Released Sep 9, 2020 (Latest) Released May 1, 2024
sh 1.14.0 2.2.2 Released Aug 28, 2020 (Latest) Released Feb 24, 2025
Bottle >=0.12.23,<=0.13 >=0.12.23,<=0.13 (0.12.25) Released Mar 4, 2023
boto3 - >=1.26.0,<2.0 (1.40.46) Released Oct 6, 2025

Testing Instructions:

@melton-jason melton-jason marked this pull request as ready for review October 7, 2025 07:45
@grantfitzsimmons grantfitzsimmons self-requested a review October 7, 2025 17:15
@grantfitzsimmons grantfitzsimmons added this to the 7.12.0 milestone Oct 27, 2025
@grantfitzsimmons
Copy link
Member

@melton-jason Can you provide an example of how to network a local Specify instance to this server? As discussed, not having luck connecting them

Copy link
Member

@acwhite211 acwhite211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't run into any problems with any of the asset server operations.

@melton-jason
Copy link
Contributor Author

melton-jason commented Nov 12, 2025

@melton-jason Can you provide an example of how to network a local Specify instance to this server? As discussed, not having luck connecting them

Here's the steps you can take to get the networking up and running with two approaches using minimal configuration changes

Change the Build Context of the Asset Server container

If you're using the Specify 7 development docker-compose.yml or some variation of an all-in-one deployment (where the asset-server service is in the same compose/network as your Specify 7 and NGINX services).

  1. Remove the image attribute pointing to a pre-existing asset-server image
  2. Add a build attribute, with the context pointing to the directory of the Asset Server containing it's Dockerfile
  3. Run a docker compose up --build or similar command that will trigger a rebuild of the asset-server service

For example, here was my asset-server service:

  asset-server:
    container_name: asset-server
    # image: specifyconsortium/specify-asset-service
    build:
      context: /Users/j626m671/Desktop/web-asset-server/.
    init: true
    volumes:
      - "attachments:/home/specify/attachments"
    environment:
      - SERVER_NAME=host.docker.internal
      - SERVER_PORT=80
      - ATTACHMENT_KEY=your_asset_server_access_key
      - DEBUG_MODE=true

Build the Asset Server image locally

  1. In the directory containing the asset server's Dockerfile execute a docker build -t tag_name .
    a. Replace tag_name with your desired name/identifier for the build tag
  2. In your Specify 7 docker-compose.yml, replace the image referenced by the image attribute with the name of the tag you built locally

For example, after executing a docker build -t updated-asset-server . referencing the asset server's Dockerfile, the following is my asset-server configuration

  asset-server:
    container_name: asset-server
    image: updated-asset-server
    init: true
    volumes:
      - "attachments:/home/specify/attachments"
    environment:
      - SERVER_NAME=host.docker.internal
      - SERVER_PORT=80
      - ATTACHMENT_KEY=your_asset_server_access_key
      - DEBUG_MODE=true

If you would like, there are other approaches to handle networking, but they can become vastly more complicated (and probably unnecessary for testing development changes).
Still, some approaches I have tested (where the asset-server container is in a separate compose compared to the other Specify 7 components):

  • Exposing the Asset Server port (8080) on the host machine (to either the same or some other port) and using that port on the local machine to
  • Not exposing any ports locally and instead adding the asset server to the Specify 7 and NGINX docker network

I pushed some changes to this branch which add some comments to the docker-compose.yml, feel free to give them a look!

@grantfitzsimmons
Copy link
Member

I had to modify my /etc/hosts file to get this to work:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost

+ 127.0.0.1	host.docker.internal

Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Ensure functionality/consistency across all endpoints described in web_asset_server.xml
    • fileget
    • fileupload
    • filedelete
    • getmetadata
    • testkey
  • For (#9), specifically test the above endpoints with PDF files, and ensure no error is raised

@melton-jason melton-jason merged commit ad0e2c4 into master Nov 14, 2025
9 checks passed
@melton-jason melton-jason deleted the update-deps branch November 14, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade python; 3.6 series has now reached EOL ImageMagick update breaks PDF thumbnailing.

4 participants