|
1 | 1 | # stackfox.dev |
2 | 2 |
|
3 | | -This repository is the public-facing StackFox site. |
4 | | - |
5 | | -It is separate from the core platform monorepo and is intended for: |
6 | | - |
7 | | -- the landing page |
8 | | -- docs content |
9 | | -- public brand and marketing assets |
10 | | - |
11 | | -It is not the dashboard app. |
| 3 | +This repository is the public-facing StackFox site. It is not the dashboard app. |
12 | 4 |
|
13 | 5 | ## Purpose |
14 | 6 |
|
15 | 7 | `stackfox.dev` owns the public web presence for StackFox. Any call to action that should send a user into the product points to the dashboard URL through an environment variable. |
16 | 8 |
|
17 | | -## Environment |
18 | | - |
19 | | -Create a local `.env` with: |
20 | | - |
21 | | -```env |
22 | | -VITE_STACKFOX_DASHBOARD_URL=http://localhost:3442 |
23 | | -``` |
24 | | - |
25 | | -This value is used for landing-page CTA links that send users into the dashboard. |
26 | | - |
27 | | -## Scripts |
28 | | - |
29 | | -```bash |
30 | | -npm install |
31 | | -npm run dev |
32 | | -npm run build |
33 | | -npm run typecheck |
34 | | -npm run lint |
35 | | -npm run test |
36 | | -``` |
37 | | - |
38 | | -## Railway deployment |
39 | | - |
40 | | -This repo uses root-level config-as-code in `railway.json`. |
41 | | - |
42 | | -That file forces Railway to treat the site as a Nitro-backed app instead of a static `dist` deploy: |
43 | | - |
44 | | -- `buildCommand`: `npm run build` |
45 | | -- `startCommand`: `npm run start` |
46 | | -- `healthcheckPath`: `/` |
47 | | - |
48 | | -### Deploy steps |
49 | | - |
50 | | -1. Import this repository as its own Railway service. |
51 | | -2. Keep the Railway config file at the repo root: `/railway.json`. |
52 | | -3. Set `VITE_STACKFOX_DASHBOARD_URL` to the public dashboard URL. |
53 | | -4. Deploy and bind the production domain after the healthcheck passes. |
54 | | - |
55 | | -### Manual production deploys from GitHub Actions |
56 | | - |
57 | | -If you want to stop Railway from deploying every commit, use `.github/workflows/deploy-production.yml` as the production deploy entrypoint for this repo. |
58 | | - |
59 | | -Required GitHub repository secret: |
60 | | - |
61 | | -- `RAILWAY_TOKEN`: a Railway project token scoped to the production environment for the `stackfox.dev` Railway project |
62 | | - |
63 | | -Required GitHub repository variables: |
64 | | - |
65 | | -- `RAILWAY_PROD_PROJECT_ID`: the Railway project ID for `stackfox.dev` |
66 | | -- `RAILWAY_PROD_ENVIRONMENT`: the Railway environment name, usually `production` |
67 | | -- `RAILWAY_PROD_SERVICE`: the Railway service ID or exact service name for the site |
68 | | - |
69 | | -Recommended GitHub environment: |
70 | | - |
71 | | -- `production-site` |
72 | | - |
73 | 9 | ## Contributing |
74 | 10 |
|
75 | 11 | Contributions to the StackFox site are welcome! If you have suggestions for improvements, please open an issue or submit a pull request. |
|
0 commit comments