Question

App Platform deploy error when source is in a subfolder

Posted January 31, 2021 471 views
DeploymentLaravelDigitalOcean App Platform

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/110-php.sh: 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

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

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.

×
Submit an Answer
1 answer

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.