From 7ba3afa50582f3f2e85171f164166d56e2e244ba Mon Sep 17 00:00:00 2001 From: "open-swe[bot]" Date: Fri, 8 Aug 2025 00:53:00 +0000 Subject: [PATCH 1/4] Apply patch [skip ci] --- .do/app.yaml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .do/app.yaml diff --git a/.do/app.yaml b/.do/app.yaml new file mode 100644 index 0000000..baf7c39 --- /dev/null +++ b/.do/app.yaml @@ -0,0 +1,62 @@ +name: anzu +services: + - name: anzu-web + dockerfile_path: Dockerfile + http_port: 3200 + instance_count: 1 + instance_size_slug: basic-xxs # Smallest size for testing, user can scale up. + routes: + - path: / + envs: + - key: ENV + value: production + - key: MONGO_URL + value: ${db.DATABASE_URL} + - key: MONGO_NAME + value: ${db.NAME} + - key: REDIS_URL + value: ${cache.INTERNAL_URL} + - key: JWT_SECRET + type: SECRET + value: "CHANGEME" # IMPORTANT: Replace with a long, random string + - key: S3_ENDPOINT + value: "CHANGEME" # e.g., nyc3.digitaloceanspaces.com + - key: S3_ACCESS_KEY_ID + type: SECRET + value: "CHANGEME" + - key: S3_SECRET_ACCESS_KEY + type: SECRET + value: "CHANGEME" + - key: S3_BUCKET_NAME + value: "anzu-assets" + - key: S3_REGION + value: "us-east-1" # Or your bucket's region + - key: OAUTH_GOOGLE_CLIENT_ID + type: SECRET + value: "CHANGEME" + - key: OAUTH_GOOGLE_CLIENT_SECRET + type: SECRET + value: "CHANGEME" + - key: OAUTH_FACEBOOK_CLIENT_ID + type: SECRET + value: "CHANGEME" + - key: OAUTH_FACEBOOK_CLIENT_SECRET + type: SECRET + value: "CHANGEME" + - key: SMTP_HOST + value: "CHANGEME" # e.g., smtp.sendgrid.net + - key: SMTP_PORT + value: "587" + - key: SMTP_USERNAME + type: SECRET + value: "CHANGEME" + - key: SMTP_PASSWORD + type: SECRET + value: "CHANGEME" + - key: SMTP_FROM_EMAIL + value: "CHANGEME" # e.g., no-reply@yourdomain.com +databases: + - name: db + engine: MONGO + - name: cache + engine: REDIS From cbbc63252e0507dd5217a7f6431db0f5f8b0ebd4 Mon Sep 17 00:00:00 2001 From: "open-swe[bot]" Date: Fri, 8 Aug 2025 00:53:29 +0000 Subject: [PATCH 2/4] Apply patch [skip ci] --- .do/deploy.template.yaml | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .do/deploy.template.yaml diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml new file mode 100644 index 0000000..70da959 --- /dev/null +++ b/.do/deploy.template.yaml @@ -0,0 +1,66 @@ +spec: + name: anzu + services: + - name: anzu-web + git: + repo_clone_url: https://github.com/tryanzu/anzu.git + branch: main + dockerfile_path: Dockerfile + http_port: 3200 + instance_count: 1 + instance_size_slug: basic-xxs # Smallest size for testing, user can scale up. + routes: + - path: / + envs: + - key: ENV + value: production + - key: MONGO_URL + value: ${db.DATABASE_URL} + - key: MONGO_NAME + value: ${db.NAME} + - key: REDIS_URL + value: ${cache.INTERNAL_URL} + - key: JWT_SECRET + type: SECRET + value: "CHANGEME" # IMPORTANT: Replace with a long, random string + - key: S3_ENDPOINT + value: "CHANGEME" # e.g., nyc3.digitaloceanspaces.com + - key: S3_ACCESS_KEY_ID + type: SECRET + value: "CHANGEME" + - key: S3_SECRET_ACCESS_KEY + type: SECRET + value: "CHANGEME" + - key: S3_BUCKET_NAME + value: "anzu-assets" + - key: S3_REGION + value: "us-east-1" # Or your bucket's region + - key: OAUTH_GOOGLE_CLIENT_ID + type: SECRET + value: "CHANGEME" + - key: OAUTH_GOOGLE_CLIENT_SECRET + type: SECRET + value: "CHANGEME" + - key: OAUTH_FACEBOOK_CLIENT_ID + type: SECRET + value: "CHANGEME" + - key: OAUTH_FACEBOOK_CLIENT_SECRET + type: SECRET + value: "CHANGEME" + - key: SMTP_HOST + value: "CHANGEME" # e.g., smtp.sendgrid.net + - key: SMTP_PORT + value: "587" + - key: SMTP_USERNAME + type: SECRET + value: "CHANGEME" + - key: SMTP_PASSWORD + type: SECRET + value: "CHANGEME" + - key: SMTP_FROM_EMAIL + value: "CHANGEME" # e.g., no-reply@yourdomain.com + databases: + - name: db + engine: MONGO + - name: cache + engine: REDIS From e65da58f525673bf442a7a7a561b535d54f056e9 Mon Sep 17 00:00:00 2001 From: "open-swe[bot]" Date: Fri, 8 Aug 2025 00:53:51 +0000 Subject: [PATCH 3/4] Apply patch [skip ci] --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index ee02ac1..374e765 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ Whether you're building a gaming community, developer forum, or general discussi > ⚠️ **Early Development**: Anzu is in active development. While functional, the API and features may change significantly. +## 🚀 Deploy to DigitalOcean + +You can deploy Anzu to the DigitalOcean App Platform with a single click. + +[![Deploy to DigitalOcean](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/tryanzu/anzu/tree/main) + +After deployment, you will need to configure the environment variables in the DigitalOcean App Platform dashboard. See the [Environment Variables](#-environment-variables) section below for more details. + ## 🛠️ Tech Stack - **Backend**: [Go 1.23+](https://golang.org/) with dependency injection @@ -186,6 +194,31 @@ We appreciate your help in making Anzu better! If you have questions, feel free - **Discussions**: Join community discussions and get help - **Wiki**: Additional documentation and guides (coming soon) +### Environment Variables + +When deploying to DigitalOcean, you will need to configure the following environment variables in the App Platform dashboard. + +| Variable | Type | Required | Description | +| ----------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------- | +| `JWT_SECRET` | `Secret` | Yes | A long, random string used to sign JWT tokens. | +| `S3_ENDPOINT` | `String` | Yes | The endpoint for your S3-compatible storage (e.g., `nyc3.digitaloceanspaces.com`). | +| `S3_ACCESS_KEY_ID` | `Secret` | Yes | The access key for your S3-compatible storage. | +| `S3_SECRET_ACCESS_KEY` | `Secret` | Yes | The secret key for your S3-compatible storage. | +| `S3_BUCKET_NAME` | `String` | Yes | The name of the S3 bucket to use for asset storage. | +| `S3_REGION` | `String` | Yes | The region where your S3 bucket is located. | +| `OAUTH_GOOGLE_CLIENT_ID` | `Secret` | No | The client ID for Google OAuth. | +| `OAUTH_GOOGLE_CLIENT_SECRET` | `Secret` | No | The client secret for Google OAuth. | +| `OAUTH_FACEBOOK_CLIENT_ID` | `Secret` | No | The client ID for Facebook OAuth. | +| `OAUTH_FACEBOOK_CLIENT_SECRET`| `Secret` | No | The client secret for Facebook OAuth. | +| `SMTP_HOST` | `String` | No | The hostname of your SMTP server. | +| `SMTP_PORT` | `String` | No | The port of your SMTP server. | +| `SMTP_USERNAME` | `Secret` | No | The username for your SMTP server. | +| `SMTP_PASSWORD` | `Secret` | No | The password for your SMTP server. | +| `SMTP_FROM_EMAIL` | `String` | No | The email address to send emails from. | +| `NEW_RELIC_KEY` | `Secret` | No | Your New Relic license key for application monitoring. | +| `NEW_RELIC_NAME` | `String` | No | The name of your application in New Relic. | +| `SENTRY_URL` | `Secret` | No | The DSN for Sentry error tracking. | + ---
From 836d45791dfdb05c4708986e71d0f516bbeb3292 Mon Sep 17 00:00:00 2001 From: "open-swe[bot]" Date: Fri, 8 Aug 2025 00:54:26 +0000 Subject: [PATCH 4/4] Empty commit to trigger CI