This example deploys self-hosted version of Strapi. Internally it uses a PostgreSQL database to store the data.
- Strapi
- Postgres
- Click the Railway button 👆
- Add the environment variables
- Media will automatically be persisted between deploys!
When developing locally this Strapi template will connect to the Postgres server from its public TCP Proxy
- Enable the feature flag
Template Service Ejectin the Feature Flags menu - Within the service settings of the Strapi service click the
Ejectbutton on the upstream repository - Clone that newly created repository locally
- Install Strapi's dependencies with
yarn installornpm install - Install the Railway CLI
- Instructions for that can be found here
- If this is your first time using the CLI make sure to login with
railway login
- Within the local repository run
railway linkto link the local repository to the Strapi service on Railway - Start Strapi for development with
railway run yarn run developorrailway run npm run develop- This command will run Strapi in development mode with the service variables available locally
- Open your browser to
http://127.0.0.1:1337/admin
- After your app is deployed, visit the
/adminendpoint to create your admin user. - If you want to use npm with this project make sure you delete the
yarn.lockfile after you have rannpm install