---
title: "Deploy swift-wild"
description: "Deploy and Host swift-wild with Railway"
category: "Other"
url: https://railway.com/deploy/swift-wild
---

# Deploy swift-wild

Deploy and Host swift-wild with Railway

**[Deploy swift-wild on Railway](https://railway.com/template/swift-wild)**

- **Creator:** LinLetLetTun's Projects
- **Category:** Other

## Template content

### team-01-app

- **Source:** vibe-code-tours/team-01-app

## Documentation

# Deploy and Host Water Delivery API on Railway

Water Delivery is a full-stack water delivery management system featuring a Next.js 15 frontend, Hono v4 API server, real-time Socket.IO, PostgreSQL via Drizzle ORM, Redis caching, and JWT authentication for managing products, subscriptions, orders, and delivery schedules.

## About Hosting Water Delivery API

Deploying the Water Delivery API on Railway involves running a Hono-based Node.js 22 server with Socket.IO for real-time features. The monorepo requires installing workspace dependencies from `@water-delivery/shared` and `@water-delivery/db` before starting. Railway provisions managed PostgreSQL and Redis, injects connection strings as environment variables, and handles SSL, networking, and autoscaling. The API listens on port 3001 and exposes `/health` for Railway health checks.

## Common Use Cases

- SaaS water delivery platform managing subscriptions, orders, delivery schedules, and customer accounts
- E-commerce backend API serving product catalogs with image uploads, payment verification, and real-time status updates
- Multi-tenant admin system with role-based access for super admins, delivery staff, and end users

## Dependencies for Water Delivery API Hosting

- PostgreSQL 16 — primary relational database for all application data
- Redis 7 — caching layer, session store, and pub/sub for Socket.IO
- Node.js 22 — runtime for Hono API and TypeScript execution
- Socket.IO v4 — WebSocket server for real-time order and admin notifications
- Better Auth — JWT sessions, passkeys, and user management
- Drizzle ORM — TypeScript ORM with migration support

### Deployment Dependencies

- [Railway PostgreSQL Plugin](https://docs.railway.app/reference/postgresql)
- [Railway Redis Plugin](https://docs.railway.app/reference/redis)
- [Hono Framework](https://hono.dev/)
- [Drizzle ORM](https://orm.drizzle.team/)
- [Better Auth](https://www.better-auth.com/)
- [Socket.IO](https://socket.io/)
- [Vercel Frontend](https://water-delivery-system-prod.vercel.app/)

### Implementation Details

```dockerfile
FROM node:22-slim
WORKDIR /app
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
COPY package.json package-lock.json ./
COPY packages/shared/package.json ./packages/shared/
COPY packages/db/package.json ./packages/db/
COPY apps/api/package.json ./apps/api/
RUN npm install
COPY packages/shared/ ./packages/shared/
COPY packages/db/ ./packages/db/
COPY apps/api/ ./apps/api/
WORKDIR /app/apps/api
EXPOSE 3001
CMD ["npx", "tsx", "src/index.ts"]
```

```toml
[build]
builder = "dockerfile"
dockerfilePath = "Dockerfile"

[deploy]
startCommand = "npx tsx src/index.ts"
healthcheckPath = "/health"
healthcheckTimeout = 300
restartPolicyType = "on_failure"
restartPolicyMaxRetries = 5
```

Required environment variables:

| Variable | Description |
|---|---|
| `DATABASE_URL` | PostgreSQL connection string from Railway plugin |
| `REDIS_URL` | Redis connection string from Railway plugin |
| `BETTER_AUTH_SECRET` | Random 32+ character string for JWT signing |
| `BETTER_AUTH_URL` | Public Railway API URL |
| `API_CORS_ORIGIN` | Frontend URL for CORS policy |
| `API_PORT` | Server listen port (default 3001) |
| `NODE_ENV` | Set to production |

## Why Deploy

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Water Delivery API on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/swift-wild
