moving from cloud run to OVHCloud VPS

This commit is contained in:
itsamejms
2026-06-13 11:23:36 +01:00
parent 6cd6c2a0d8
commit 4950ea2402
8 changed files with 118 additions and 25 deletions
+29
View File
@@ -0,0 +1,29 @@
## GCP deploy
- `gcloud auth login`
- `gcloud config set project itsamejms`
- `gcloud auth application-default set-quota-project itsamejms`
- `gcloud run services list`
- `gcloud services enable run.googleapis.com artifactregistry.googleapis.com storage.googleapis.com`
- `gcloud storage buckets create gs://jms-git-bucket --location=europe-west1` # for snapshots
- `gcloud storage buckets create gs://jms-git-repos-storage --location=europe-west1` # for repositories .git folders
```
gcloud beta run deploy gitea-serverless \
--source . \
--region europe-west1 \
--allow-unauthenticated \
--max-instances 1 \
--memory 1Gi \
--port 3000 \
--set-env-vars="GCS_BUCKET_NAME=jms-git-bucket" \
--set-env-vars="GITEA_WORK_DIR=/data/gitea" \
--set-env-vars="GITEA_CUSTOM=/data/gitea" \
--set-env-vars="GCS_ACCESS_KEY=GCS_ACCESS_KEY" \
--set-env-vars="GCS_SECRET_KEY=GCS_SECRET_KEY" \
--add-volume=name=git-storage,type=cloud-storage,bucket=jms-git-repos-storage,mount-options="uid=1000;gid=1000;file-mode=0666;dir-mode=0777;stat-cache-ttl=600s;type-cache-ttl=600s" \
--add-volume-mount=volume=git-storage,mount-path=/data/gitea/app_data/repositories
```
### Gitea git dump
- `gcloud storage cp -r 'gs://jms-git-repos-storage/*' ./gitea-dump/`