{"id":21243958,"url":"https://github.com/aaronksaunders/payload-railway-postgres","last_synced_at":"2026-05-21T04:04:25.671Z","repository":{"id":199354378,"uuid":"702695705","full_name":"aaronksaunders/payload-railway-postgres","owner":"aaronksaunders","description":"template for running PayloadCMS v2 with PostgreSQL  on Railway","archived":false,"fork":false,"pushed_at":"2023-10-10T05:30:56.000Z","size":180,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-21T20:11:19.855Z","etag":null,"topics":["payloadcms","postgres","postgresql","railway","railway-template"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronksaunders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-09T20:21:59.000Z","updated_at":"2024-08-01T13:39:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"f43d9b54-bf4c-4ce1-9de6-0550ca77b24c","html_url":"https://github.com/aaronksaunders/payload-railway-postgres","commit_stats":null,"previous_names":["aaronksaunders/payload-railway-postgres"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fpayload-railway-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fpayload-railway-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fpayload-railway-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fpayload-railway-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronksaunders","download_url":"https://codeload.github.com/aaronksaunders/payload-railway-postgres/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243682913,"owners_count":20330519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["payloadcms","postgres","postgresql","railway","railway-template"],"created_at":"2024-11-21T01:15:00.450Z","updated_at":"2026-05-21T04:04:20.640Z","avatar_url":"https://github.com/aaronksaunders.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payload CMS v2 with PostgreSQL Database\n\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/B_KVXT?referralCode=1-iY_G)\n\nThe original project was created using `npx create-payload-app` and used the blank template.\n\n## How to Use Locally with Remote PostgreSQL Database\n\u003e Following these instructions will have the application pointing to the hosted PostgreSQL database\n- `yarn install` to install the needed dependencies\n- Install and configure the [Railway CLI](https://docs.railway.app/develop/cli)\n- `railway run yarn dev` will start up your application and reload on any changes. At this point changes in the schema will be automatically updated in the remote PostgreSQL database\n-  to create migration before committing your code `railway run yarn payload migrate:create`\n\n## How to Use Locally with Local PostgreSQL Database\n- `yarn install` to install the needed dependencies\n- Create your own local Postgres Database and update the `.env` file with the `DATABASE_URI`\n- Set the other `.env` file variables\n- `yarn dev` will start up your application and reload on any changes\n- Payload will update the database schema locally so you will need to run `railway run yarn payload migrate:create` before committing to GitHub so the schema changes get committed. The deployment script will run the appropriate migrate command to push changes to the database\n\n\n## PostgreSQL Information\n- https://www.postgresql.org/download/\n### How To Create a Local PostgreSQL Database\n\nOpen the terminal and run the command\n```\nsudo -u postgres psql\n```\n\nCreate PostgreSQL Database\n```\nCREATE DATABASE myproject;\n```\n\nCreate User\n```\nCREATE USER myprojectuser WITH PASSWORD 'password';\n```\n\nUpdate the `.env` file variable `DATABASE_URI` appropriately to point to the correct server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronksaunders%2Fpayload-railway-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronksaunders%2Fpayload-railway-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronksaunders%2Fpayload-railway-postgres/lists"}