Skip to content

Commit 2382ea5

Browse files
committed
fix stuff
1 parent 1565d57 commit 2382ea5

2 files changed

Lines changed: 184 additions & 5 deletions

File tree

.github/DEPLOYMENT.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Cloudflare Workers Deployment Guide
2+
3+
This guide covers deploying FixFX Links to Cloudflare Workers.
4+
5+
## Prerequisites
6+
7+
1. Cloudflare account at https://dash.cloudflare.com
8+
2. Workers enabled on your account
9+
3. Wrangler CLI installed globally: `npm install -g wrangler`
10+
4. Domain registered (for production deployment)
11+
12+
## Setup Steps
13+
14+
### 1. Authenticate with Cloudflare
15+
16+
```bash
17+
wrangler login
18+
```
19+
20+
This will open a browser to grant Wrangler access to your Cloudflare account.
21+
22+
### 2. Configure wrangler.toml
23+
24+
Update the `wrangler.toml` file with your settings:
25+
26+
```toml
27+
account_id = "your-account-id" # Found in Cloudflare dashboard
28+
```
29+
30+
For production with a custom domain:
31+
32+
```toml
33+
[env.production]
34+
name = "fixfx-links-prod"
35+
routes = [
36+
{ pattern = "links.fixfx.wiki", zone_name = "fixfx.wiki" }
37+
]
38+
```
39+
40+
Replace `links.fixfx.wiki` and `fixfx.wiki` with your actual domain.
41+
42+
### 3. Deploy to Workers
43+
44+
Deploy to the default development environment:
45+
46+
```bash
47+
bun run deploy
48+
```
49+
50+
Or deploy to production:
51+
52+
```bash
53+
bun run deploy -e production
54+
```
55+
56+
The site will be available at:
57+
- Development: `https://fixfx-links.workers.dev`
58+
- Production: `https://links.fixfx.wiki` (if configured)
59+
60+
## Environment Variables
61+
62+
To set environment variables for your Workers:
63+
64+
```bash
65+
wrangler secret put VARIABLE_NAME
66+
```
67+
68+
Then access in your code:
69+
70+
```typescript
71+
const value = process.env.VARIABLE_NAME
72+
```
73+
74+
## Monitoring & Logs
75+
76+
View real-time logs:
77+
78+
```bash
79+
wrangler tail
80+
```
81+
82+
View in Cloudflare dashboard:
83+
1. Log in to https://dash.cloudflare.com
84+
2. Go to Workers > your-project > Logs
85+
86+
## Custom Domain Setup
87+
88+
To use a custom domain with Cloudflare Workers:
89+
90+
1. Buy domain through Cloudflare or point nameservers to Cloudflare
91+
2. Update `wrangler.toml` with route configuration
92+
3. Redeploy: `bun run deploy -e production`
93+
4. Navigate to your domain in Cloudflare dashboard and verify Workers route
94+
95+
## Performance Optimization
96+
97+
Cloudflare Workers provides built-in optimizations:
98+
- Global edge network distribution
99+
- Automatic gzip compression
100+
- HTTP/2 and HTTP/3 support
101+
- Automatic HTTPS with free SSL
102+
103+
## Troubleshooting
104+
105+
### 401 Unauthorized
106+
Run `wrangler login` again to re-authenticate.
107+
108+
### Build fails
109+
Ensure all dependencies are installed:
110+
```bash
111+
bun install
112+
```
113+
114+
### Site not loading
115+
Check Workers dashboard for errors:
116+
1. https://dash.cloudflare.com
117+
2. Workers > fixfx-links > Deployments
118+
119+
### Custom domain not working
120+
Verify in Cloudflare dashboard:
121+
1. Domain is using Cloudflare nameservers
122+
2. Workers route matches your domain exactly
123+
3. SSL/TLS is set to "Full" or better
124+
125+
## Rollback
126+
127+
To rollback to a previous deployment:
128+
129+
1. Go to Cloudflare dashboard
130+
2. Workers > fixfx-links > Deployments
131+
3. Click the deployment you want to rollback to
132+
4. Click "Rollback"
133+
134+
## Local Testing
135+
136+
Test the production build locally:
137+
138+
```bash
139+
bun run build
140+
bun run start
141+
```
142+
143+
Then visit `http://localhost:3000`
144+
145+
## Additional Resources
146+
147+
- Cloudflare Workers Docs: https://developers.cloudflare.com/workers/
148+
- Wrangler CLI Docs: https://developers.cloudflare.com/workers/wrangler/
149+
- TanStack Start Deployment: https://tanstack.com/start/latest/docs/framework/react/guide/deploying

.github/README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
A link aggregation hub for FiveM resources, documentation, and community support servers. Built with TanStack Start and deployed on Cloudflare Workers.
44

5+
[![Build status](https://github.com/CodeMeAPixel/FixFX-LinkInBio/actions/workflows/test-build.yml/badge.svg)](https://github.com/CodeMeAPixel/FixFX-LinkInBio/actions)
6+
[![Lint status](https://github.com/CodeMeAPixel/FixFX-LinkInBio/actions/workflows/validate-linting.yml/badge.svg)](https://github.com/CodeMeAPixel/FixFX-LinkInBio/actions)
7+
[![Format status](https://github.com/CodeMeAPixel/FixFX-LinkInBio/actions/workflows/validate-formatting.yml/badge.svg)](https://github.com/CodeMeAPixel/FixFX-LinkInBio/actions)
8+
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](LICENSE)
9+
[![Deployed on Cloudflare Workers](https://img.shields.io/badge/Deployed%20on-Cloudflare%20Workers-orange.svg)](https://workers.cloudflare.com/)
10+
511
## Features
612

713
- **Categorized Links**: Organize resources into community, documentation, tools, and support server categories
@@ -116,15 +122,15 @@ The site will be available at `https://your-project.workers.dev`.
116122

117123
### Custom Domain
118124

119-
To use a custom domain, update `wrangler.toml`:
125+
To use a custom domain, update `wrangler.jsonc`:
120126

121-
```toml
127+
```jsonc
122128
routes = [
123129
{ pattern = "links.fixfx.wiki", zone_name = "fixfx.wiki" }
124130
]
125131
```
126132

127-
Then redeploy.
133+
Then redeploy. See [DEPLOYMENT.md](DEPLOYMENT.md) for detailed instructions.
128134

129135
## Technology Stack
130136

@@ -133,7 +139,7 @@ Then redeploy.
133139
- **Styling**: Tailwind CSS v4
134140
- **Icons**: Lucide React
135141
- **Build Tool**: Vite with TanStack Start plugin
136-
- **Deployment**: Cloudflare Workers (Nitro)
142+
- **Deployment**: Cloudflare Workers
137143
- **Utilities**: clsx, tailwind-merge
138144

139145
## Browser Support
@@ -143,7 +149,31 @@ Modern browsers with ES2020+ support:
143149
- Firefox 88+
144150
- Safari 14+
145151

152+
## Contributing
153+
154+
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on:
155+
- Setting up your development environment
156+
- Code style and standards
157+
- Commit conventions
158+
- Testing requirements
159+
- Deployment process
160+
161+
## Code of Conduct
162+
163+
This project is committed to providing a welcoming and inclusive environment. Please review our [Code of Conduct](CODE_OF_CONDUCT.md) before participating.
164+
165+
## Security
166+
167+
For security concerns and vulnerability reporting, please see [SECURITY.md](SECURITY.md). **Do not** open public issues for security vulnerabilities.
168+
146169
## License
147170

148-
MIT
171+
This project is licensed under the [GNU Affero General Public License v3](../LICENSE) (AGPL-3.0). See the LICENSE file for details.
172+
173+
## Contact
174+
175+
Questions or suggestions? Reach out:
176+
- **Email**: [hey@codemeapixel.dev](mailto:hey@codemeapixel.dev)
177+
- **GitHub**: [CodeMeAPixel/FixFX-LinkInBio](https://github.com/CodeMeAPixel/FixFX-LinkInBio)
178+
- **Site**: [https://links.fixfx.wiki](https://links.fixfx.wiki)
149179

0 commit comments

Comments
 (0)