Hi, I am trying to add the option catchall_document: index.html to my app spec via doctl. However I recieve 500 server error evertime I run this command:
doctl apps update <app_id> --spec ~/dev/.do/quiz-app.yaml.

doctl apps spec validate says my spec is valid. What am I doing wrong and why cannot update my app spec at all from doctl???

2 comments
  • I also tried to rename my default branches to main instead of master

  • the app spec:

    name: quiz-backend
    region: fra
    databases:
        - cluster_name: quiznights-redis
          engine: REDIS
          name: quiznights-redis
          production: true
          version: "6"
        - cluster_name: db-mysql-fra1-40094
          db_name: quiz
          db_user: quiznights
          engine: MYSQL
          name: db-mysql-fra1-40094
          production: true
          version: "8"
    services:
        - environment_slug: node-js
          gitlab:
              branch: main
              deploy_on_push: true
              repo: quiznights/quiz-backend
          http_port: 8080
          instance_count: 1
          instance_size_slug: basic-xxs
          name: quiz-backend
          routes:
              - path: /api
          run_command: npm start
    static_sites:
        - build_command: npm run build
          catchall_document: index.html
          environment_slug: node-js
          gitlab:
              branch: main
              deploy_on_push: true
              repo: quiznights/quiz-frontend
          name: quiz-frontend
          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.

×
1 answer

Hi @miccoh,

Usually this means that there is a validation error in the spec that is mis-categorized as a 500 error instead. Could you post the YAML that you’re trying to upload? Do you happen to have error_document configured as well? It’s mutually exclusive with catchall_document so you’ll need to remove it if so.

If you would like to, you can add the --trace option to doctl to print the full details of the request and attach it to a support ticket so that the team can take a closer look.

As for the doctl apps spec validate command, currently it only does basic validation around the YAML structure. We’re working on expanding the scope of validation checks that it performs, but currently it does not include all the rules.

  • name: quiz-backend
    region: fra
    databases:
        - cluster_name: quiznights-redis
          engine: REDIS
          name: quiznights-redis
          production: true
          version: "6"
        - cluster_name: db-mysql-fra1-40094
          db_name: quiz
          db_user: quiznights
          engine: MYSQL
          name: db-mysql-fra1-40094
          production: true
          version: "8"
    services:
        - environment_slug: node-js
          gitlab:
              branch: main
              deploy_on_push: true
              repo: quiznights/quiz-backend
          http_port: 8080
          instance_count: 1
          instance_size_slug: basic-xxs
          name: quiz-backend
          routes:
              - path: /api
          run_command: npm start
    static_sites:
        - build_command: npm run build
          catchall_document: index.html
          environment_slug: node-js
          gitlab:
              branch: main
              deploy_on_push: true
              repo: quiznights/quiz-frontend
          name: quiz-frontend
          routes:
              - path: /
    
  • I suggest that team give better error reporting on .yaml spec. FYI the .yaml spec that I posted was directly from doctl, the only thing I added was catchall_document.... which means that you can’t validate the spec that your system produces…

Submit an Answer