Hey guys, currently im trying to deploy a symfony app on the app platform, so far i’m able to get the application to deploy but when i got to the active webpage i get a 403, this is due to the server looking wihtin the / of my project rather than /public where my assets are, i’ve had a google and it seems all i need to do is define the root and the define the output_dir to be my built assets dir
Below is my config, i have been unable to find the correct format for this, i also seem to have also found a post somewhere in the community forms here saying there should be an output directory input field upon creating the services but am unable to see where that is.
Thanks!
alerts:
- rule: DEPLOYMENT_FAILED
- rule: DOMAIN_FAILED
databases:
- engine: PG
name: db
version: "12"
envs:
- key: APP_ENV
scope: RUN_AND_BUILD_TIME
value: dev
features:
- buildpack-stack=ubuntu-22
ingress:
rules:
- component:
name: vectisplanner
match:
path:
prefix: /
name: vectisplanner
region: lon
services:
- build_command: |
composer update
composer install
npm run build
environment_slug: php
envs:
- key: DATABASE_URL
scope: RUN_TIME
value: ${db.DATABASE_URL}
github:
branch: main
deploy_on_push: true
repo: Wordlesschunk/VectisPlanner
http_port: 8080
instance_count: 1
instance_size_slug: basic-xs
name: vectisplanner
run_command: heroku-php-apache2
source_dir: /
the application is working if i go to https://blah.com/public
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!
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.
Hey!
What you would need to do is just extend your
run_command
to:That way the web server will be started with the correct public directory.
I have a similar Laravel project with that exact setup:
Hope that this helps!
Best,
Bobby