Skip to content

Commit 4b0b15e

Browse files
merge: feature/ecommerce-complete main (Railway deploy fixes)
2 parents dc503a7 + b5ee32e commit 4b0b15e

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

railway.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
builder = "nixpacks"
33

44
[deploy]
5-
startCommand = "npm start"
5+
startCommand = "bash start.sh"
66
healthcheckPath = "/"
77
healthcheckTimeout = 300
88
restartPolicyType = "on_failure"

src/app/page.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
import { redirect } from "next/navigation";
2-
31
export default function Home() {
4-
redirect("/products");
2+
return (
3+
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center">
4+
<div className="text-center">
5+
<h1 className="text-4xl font-bold text-gray-900 mb-4">
6+
Welcome to Cartzy
7+
</h1>
8+
<p className="text-lg text-gray-600 mb-8">
9+
Your e-commerce platform is running successfully!
10+
</p>
11+
<a
12+
href="/products"
13+
className="inline-block bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition-colors"
14+
>
15+
Browse Products
16+
</a>
17+
</div>
18+
</div>
19+
);
520
}

src/lib/auth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
4040
console.log(`User signed in: ${user.email} (New user: ${isNewUser})`)
4141
},
4242
},
43+
trustHost: true,
44+
useSecureCookies: process.env.NODE_ENV === "production",
4345
})

start.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
# Wait for database to be ready
44
echo "Waiting for database to be ready..."
5-
sleep 10
5+
sleep 15
66

77
# Run database migrations
88
echo "Running database migrations..."
9+
echo "DATABASE_URL=$DATABASE_URL"
910
npx prisma migrate deploy
1011

1112
# Start the application
1213
echo "Starting the application..."
13-
npm start
14+
node .next/standalone/server.js

0 commit comments

Comments
 (0)