Railway
Note
You need to be connected to GitHub account in https://railway.app/account/plans to perform the deployment.
Deployment Instructions via Railway Template¶
- Go to the Director's Railway Template.
- Click Deploy Now.
- Set the frontend environment variable
VITE_APP_BACKEND_URL
with a placeholder. - For the backend, configure the required environment variables
VIDEO_DB_API_KEY
andOPENAI_API_KEY
. Optionally, you can configure additional environment variables as needed. - Click Deploy.
- Once both services are deployed successfully, click on the backend service and copy the public URL (e.g.,
https://backend-production-xxxx.up.railway.app
). - Update the frontend's
VITE_APP_BACKEND_URL
variable with the copied backend URL. - After updating the
VITE_APP_BACKEND_URL
variable, a Deploy option will appear. Click it to re-deploy the frontend. - Once deployment is complete, access the application through the frontend's public URL, such as
https://frontend-production-xxxx.up.railway.app
.
Deployment Instructions via Railway CLI¶
- Clone the Director repository to your local machine:
- Change the directory to the cloned repository:
- Install the Railway CLI.
- Navigate to the Railway Dashboard and create an empty project.
- Add two empty services to the project, and rename them as backend and frontend.
- Log in to Railway via the CLI:
Deploy the backend service:¶
- Navigate to the backend service directory
- Link your project and the backend service
- Deploy the backend service
Deploy the frontend service:¶
- Navigate to the frontend service directory
- Link your project and the frontend service
- Deploy the frontend service
Backend Configuration¶
-
After deployment, go to the Railway project dashboard, and under the backend service, update the environment variables:
-
Go to Settings → Networking → Public Networking, generate a domain, and copy the domain. You will need to use this domain in the frontend service configuration.
Frontend Configuration¶
-
In the frontend service , update the following environment variable:
-
After deployment, generate a domain and navigate to the frontend service URL (which can be found in Settings → Networking → Public Networking) in your web browser to access the Director application.