first commit
This commit is contained in:
@@ -1,36 +1,57 @@
|
||||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||
# GCSim Translator
|
||||
|
||||
## Getting Started
|
||||
A shadcn-powered editor that translates Genshin character builds into paste-ready [gcsim](https://github.com/genshinsim/gcsim) character config blocks.
|
||||
|
||||
First, run the development server:
|
||||
## Local development
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun install
|
||||
bun dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
Without `DATABASE_URL`, the editor uses a small fallback catalog. Production reads Buzz Sheet's existing `catalog` schema and images through `S3_PUBLIC_URL`. Team drafts stay in browser `localStorage`; the application never writes to PostgreSQL.
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
```bash
|
||||
bun run test
|
||||
bun run typecheck
|
||||
bun run lint
|
||||
```
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||
## Production
|
||||
|
||||
## Learn More
|
||||
The `gcsim-secrets` Kubernetes secret only needs `DATABASE_URL`. Use a dedicated PostgreSQL role with read-only access to the Buzz Sheet `catalog` schema.
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
Create the local secret file and replace its database URL:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
```bash
|
||||
cp .env.example .env.production
|
||||
```
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
Review the file, select the intended cluster context, and apply it without committing the generated Secret:
|
||||
|
||||
## Deploy on Vercel
|
||||
```bash
|
||||
kubectl config current-context
|
||||
kubectl apply -f k8s/namespace.yaml
|
||||
kubectl --namespace gcsim create secret generic gcsim-secrets \
|
||||
--from-env-file=.env.production \
|
||||
--dry-run=client \
|
||||
-o yaml | kubectl apply -f -
|
||||
```
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
Confirm only the key names, without printing their values:
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||
```bash
|
||||
kubectl --namespace gcsim get secret gcsim-secrets \
|
||||
-o go-template='{{range $key, $_ := .data}}{{printf "%s\\n" $key}}{{end}}'
|
||||
```
|
||||
|
||||
After rotating the database credential, restart the application so the Deployment receives it:
|
||||
|
||||
```bash
|
||||
kubectl --namespace gcsim rollout restart deployment/gcsim
|
||||
kubectl --namespace gcsim rollout status deployment/gcsim --timeout=10m
|
||||
```
|
||||
|
||||
Gitea Actions verifies every push and pull request, then builds and deploys `main` when `DEPLOY_ENABLED=true` and the repository-level `KUBE_CONFIG_B64` Actions secret is configured. `KUBE_CONFIG_B64` is a Gitea Actions secret, not part of `gcsim-secrets`.
|
||||
|
||||
The ingress hostname is `gcsim.gunshiz.top`. Buzz Sheet remains responsible for syncing Lunaris data and storing catalog images in Bun S3; this app only reads that shared catalog and public image base.
|
||||
|
||||
Reference in New Issue
Block a user