Astro + Railway - Using Astro Starter Blog Kit
Hi All,
I'm trying to deploy the Astro Starter Kit: Blog via a Github connection (Just testing deploying to Railway as I normally use Vercel). Although the overall project has deployed, accessing the Public URL gets a 502 Bad Gateway (Application failed to respond). I've read the other support articles for Astro<>Railway - however, applying those doesn't seem to work for this project? Likely something I'm doing π
Wondering if anyone has additional thoughts or config - e.g., package.json, astro.config.ms, etc.. Current astro.config.ms
Wondering if anyone has additional thoughts or config - e.g., package.json, astro.config.ms, etc.. Current astro.config.ms
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
// https://astro.build/config
export default defineConfig({
site: "https://example.com",
integrations: [mdx(), sitemap(), tailwind()],
});
package.json
{
"name": "virtual-venus",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.2",
"@astrojs/mdx": "^3.1.3",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.13.2",
"tailwindcss": "^3.4.9",
"typescript": "^5.5.4"
}
}
Thanks in advance!Solution:Jump to solution
hmmm not sure why aleks linked a vue example for your question about astro.
here is one for astro - https://github.com/brody192/astrowind-template...
6 Replies
Project ID:
d3ec5024-34c6-4258-b5c8-b71dcde27f07
Project ID - d3ec5024-34c6-4258-b5c8-b71dcde27f07
Your problem looks to be that you're running a development server in production (don't do that!) - try copying the
Caddyfile
and nixpacks.toml
into your project from https://github.com/brody192/vue-3-templateGitHub
GitHub - brody192/vue-3-template
Contribute to brody192/vue-3-template development by creating an account on GitHub.
Also, that's only going to be serving static files, which Railway is not optimized for, so for production static sites I'd recommend sticking with something like Vercel, which serves from a CDN
hey @root --- thanks for the insights! It did seem strange on the dev side π
So tried the above, and ended up with the same outcome π’ It's all good... doesn't look like there is great support for Astro<>Railway. I'll stick to Vercel, going to try out my Cloudflare Pages setup instead π
I did see that Brody has a Astro Template (Astrowind) so I'll play around with that as well - it seems to deploy and build well.
Solution
hmmm not sure why aleks linked a vue example for your question about astro.
here is one for astro - https://github.com/brody192/astrowind-template