Question

Using GDAL with App Platform

I am trying to deploy a django app to app platform, a process I have done a bunch of times. My workflow follows this tutorial: https://docs.digitalocean.com/tutorials/app-deploy-django-app/

I push new updates to my github repository and then the app builds and deploys

This new app requires GDAL be installed on the runtime system, however I am unclear on how I can get this set up on the environment.

Currently my build fails and ChatGPT tells me that the error is:

This error suggests that the system is unable to locate the libgdal shared library required by Django’s GeoDjango module, which is used for geographic and spatial functionality. This library is a dependency for the django.contrib.gis module, which is causing the error in your case.

The issue could be related to missing or misconfigured dependencies or a problem with the environment setup.

Any suggestions would be appreciated.

M


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
June 9, 2023

Hi there,

Indeed, it sounds like that the GDAL package is not available by default on the DigitalOcean App Platform.

However, in order to install custom dependencies, you would need to use a Dockerfile rather than the native buildpacks.

You can follow the steps on how to do that here:

https://docs.digitalocean.com/products/app-platform/reference/dockerfile/

That way you will have full control over what packages get installed during the build process.

Hope that this helps!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.