9 months ago
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
`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!
0 Replies
9 months ago
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-template
9 months ago
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.
9 months ago
hmmm not sure why aleks linked a vue example for your question about astro.