App Platform deploy error when source is in a subfolder

I’m trying to deploy a simple web application with the app platform. It’s built in Statamic which is a cms framework on top of Laravel. The source of the app is located in an src folder of the github repository.

I get an error message when trying to deploy with the app platform. Strange thing is that when I moved the sources out of the src directory to the repo root and removed the source_dir entry of my app spec yaml, the site deployed without any issues whatsoever.

I tried everything that I could think of to solve this issue but I’m starting to think the problem is out of my reach and lies within the app platform.

Any help is very much appreciated. See details below.

Deploy logs

webapp | 11:49:47 /layers/heroku_php/profile/profile.d/ line 6: php: command not found
webapp | 11:49:47 bash: heroku-php-apache2: command not found

App spec yaml (with sensitive information left out)

name: website
region: nyc

- name: webapp
  environment_slug: php
    repo: ---
    branch: main
    deploy_on_push: true
  run_command: heroku-php-apache2 public/
  source_dir: src
    - key: APP_ENV
      scope: RUN_AND_BUILD_TIME
      value: production
    #- etc...
  instance_size_slug: basic-xxs
  instance_count: 1
  http_port: 8080
   - path: /

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @pcserni!

Sorry about that. This is a known issue that we are working on. The problem is indeed with PHP apps that use the source_dir option. I’ll make a note to post an update here once it’s fixed.