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
+39 -24
View File
@@ -1,26 +1,41 @@
## 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
### OVHCloud VPS deploy
VPS name: vps-123c23bd.vps.ovh.net
IPv4 address: 51.91.109.47
IPv6 address: 2001:41d0:42b:61::1
Username: ubuntu
Password: <PASSWORD>
- `ssh ubuntu@vps-123c23bd.vps.ovh.net`
```
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
```
# 1. Update the system repository
sudo apt update && sudo apt upgrade -y
# 2. Grab the required security certificates and curl
sudo apt install ca-certificates curl -y
sudo install -m 0755 -d /etc/apt/keyrings
# 3. Download Docker's official GPG keying for package verification
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# 4. Inject Docker's official repository into your system's source list
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# 5. Update your system packages using the new official source
sudo apt update
# 6. Install the official Docker Engine and modern Compose Plugin
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
# Give your 'ubuntu' user permission to use Docker without typing 'sudo' every time
sudo usermod -aG docker $USER
```
- `mkdir -p ~/gitea`
- `cd ~/gitea`
- `docker compose up -d`
- `docker compose logs`
- `scp -r /Users/jamestwose/Coding/jms-gitea/gcloud-version/gitea-dump/* ubuntu@vps-123c23bd.vps.ovh.net:~/gitea/gitea_data/`