We updated our test local server that have all-in-one docker version to the 7.11.3 and run smoth till now except for attachments. It has attachment server v2 but when you open any attachment, it doesnt have the test server url, but the production ones. yml , database and global parameters are set to the local url and the web_asset_store.xml has the proper content and is accesible via browser so we dont know where to start to look for fixing it.
If i get that asset1 url and change the domain to the local domain, attachment is there and its returned by asset server, but its like anywhere on the config still having the default attachment url. Any tip?
Thanks!!!
In the docker-compose.yml file for the web asset server, there is a place to define the attachment server name and key:
The Specify 7 environment has the similar variables, where the ASSET_SERVER_URL and ASSET_SERVER_KEY should be changed to your local asset server URL and key (matching those defined for the web asset server).
Local environments are not configured by default to use assets1.specifycloud.org unless explicitly told to, and the attachment key for that server is not public. Can you share your configuration files (after redacting sensitive credentials and keys)? Thank you!
One of our developers tried to recreate this using various setups and configurations. However, our default configuration and source code do not reference the assets1.specifycloud.org URL.
We suspect that the containers or images weren’t rebuilt after the environment variables were changed. It’s likely using the build cache from the previous production build. Can you see if rebuilding the cache makes a difference?
docker compose down
docker compose up -d --build
If this doesn’t solve it, you can run printenv in both the Specify 7 and Asset Server container to make sure the variables match what is expected.
After check some config files and xml where still the production server assets1.XXXXX.org urls set as asset server and rebuild the server. Works fine!!
Checking the logs when specify launches, it throw a warning or message about operations pending to perform.
specify7-1 | Operations to perform:
specify7-1 | Apply all migrations: accounts, attachment_gw, auth, businessrules, contenttypes, notifications, patches, permissions, sessions, specify, workbench
specify7-1 | Running migrations:
specify7-1 | No migrations to apply.
specify7-1 | Your models in app(s): ‘specify’ have changes that are not yet reflected in a migration, and so won’t be applied.
specify7-1 | Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.
Thats normal or is because there was a partial or not finished migration?