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!
Hey!
What you would need to do is just extend your run_command to:
run_command: heroku-php-apache2 public/
That way the web server will be started with the correct public directory.
I have a similar Laravel project with that exact setup:
https://github.com/thedevdojo/wave/blob/main/.do/deploy.template.yaml#L9
Hope that this helps!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.