Hosting the App from GitHub

samuelHOBBY

a year ago

I am hosting an app from Github built with PHP (Plain) but I get failed errors every time I upload it here. The app does not use Docker but XAMPP. How do I solve this issue?

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

6 Replies

a year ago

Railway does not run your applications with XAMPP as that is for local development.

Railway runs everything with Docker, please provide the errors you are getting.


samuelHOBBY

a year ago

Ok thanks a lot for your reply. The issue is that, the deploy isn't passing. As you said perhaps I should use Docker. But sometimes when I host it i passed but I get errors on the domain [generated one] that some directories can't loaded/included. I don't know how Railway resolve directories to determine the root directory because I have my index.php in my /pulbic directory and the error I can say "Can't include path 'App/../vendor/autoload'". I don't know if it's an error of the dependencies not being installed from my composer.json file


samuelHOBBY

a year ago

Is it a must to use Docker?


a year ago

It's likely you have an unconventional directory structure, I would recommend writing a Dockerfile to properly deploy your app.


samuelHOBBY

a year ago

My directory structure is like:App [directory]

public [root directory (contains index.php, .htaccess, scripts and css)]Views [directory]vendor [directory]composer.jsoncomposer.lock.envProcfilephpunit.xmlIs there any problem with this structure? The error I am getting on the web is "Can't include path 'app/../vendor/autoload.php' ".In my /public/index.php file i have that line to enable the autoloading of classes.I think the problem is on the resolution of the dependencies and I think the autoloader is not getting install.

How can I install dependencies on railway?


samuelHOBBY

a year ago

My directory structure is like:

App [directory]

public [root directory (contains index.php, .htaccess, scripts and css)]

Views [directory]

vendor [directory]

composer.json

composer.lock.

env

Procfilephpunit.xml

Is there any problem with this structure? The error I am getting on the web is "Can't include path 'app/../vendor/autoload.php' ".In my /public/index.php file i have that line to enable the autoloading of classes.I think the problem is on the resolution of the dependencies and I think the autoloader is not getting install.

How can I install dependencies on railway?


Hosting the App from GitHub - Railway Help Station