Skip to content

Commit

Permalink
Merge branch 'main' into Laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
nermalcat69 authored Jan 8, 2025
2 parents d8147f5 + a4b4317 commit d10bec6
Show file tree
Hide file tree
Showing 64 changed files with 815 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: 💁 Support
url: https://discord.gg/xxzmJSDKPT
url: https://docs.zerops.io/discord
about: 'This issue tracker is not for support questions. Join us on Discord for assistance!'
- name: 📘 Documentation
url: https://github.com/zeropsio/docs
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<!-- #### First-time contributor to Zerops Docs? -->

<!-- Join our Discord Server -->
<!-- https://discord.gg/xxzmJSDKPT -->
<!-- https://docs.zerops.io/discord -->
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![CI](https://img.shields.io/github/actions/workflow/status/zeropsio/docs/build.yml?labelColor=EDEFF3&color=8F9DA8)](https://github.com/zeropsio/docs/actions/workflows/build.yml)
![GitHub contributors](https://img.shields.io/github/contributors/zeropsio/docs?labelColor=EDEFF3&color=8F9DA8)
[![Discord](https://img.shields.io/discord/735781031147208777?labelColor=EDEFF3&color=8F9DA8)](https://discord.gg/xxzmJSDKPT)
[![Discord](https://img.shields.io/discord/735781031147208777?labelColor=EDEFF3&color=8F9DA8)](https://docs.zerops.io/discord)
![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/zeropsio)

Our <b>Documentation</b> for people who want help with interacting with <a href="https://zerops.io/" target="_blank">Zerops</a> platform. <a href="https://docs.zerops.io/" target="_blank">Read the docs →</a>
Expand All @@ -21,7 +21,7 @@ yarn dev

If you're planning to contribute to our documentation, please check out our [CONTRIBUTING.md](https://github.com/zeropsio/docs/blob/main/CONTRIBUTING.md) guide.

If you have any questions, please feel free to join [Zerops Discord Server](https://discord.gg/xxzmJSDKPT).
If you have any questions, please feel free to join [Zerops Discord Server](https://docs.zerops.io/discord).

## 🧩 Links

Expand All @@ -31,7 +31,7 @@ If you have any questions, please feel free to join [Zerops Discord Server](http
<a href="https://x.com/zeropsio">Twitter</a>
<a href="https://discord.gg/xxzmJSDKPT">Discord Server</a>
<a href="https://docs.zerops.io/discord">Discord Server</a>
<a href="http://linkedin.com/company/zerops/">LinkedIn</a>
</b>
Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/additional-resources/glossary.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/additional-resources/roadmap.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/additional-resources/utility-recipes.mdx

This file was deleted.

7 changes: 7 additions & 0 deletions apps/docs/content/elasticsearch/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ envSecrets:
- **Note**: To increase available memory, adjust the service's RAM allocation in scaling configuration <!-- fixme (js) add link to generic scaling page -->
- **Important**: Changes to HEAP_PERCENT require a service restart to take effect

## Backup

- **Format:** .gz
- **Implementation:** Created using elasticdump and compressed using gzip

For detailed information about backup configuration and management, see [Backup Management](/features/backup)

## Example Configuration

```yaml
Expand Down
62 changes: 62 additions & 0 deletions apps/docs/content/features/backup.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Backup data
description: Learn how you can work with backups in Zerops works.
---
Zerops provides data backup for certain services.

Whether a service supports backups is specified on the documentation page of each service. Technical details about backup implementation for each service are also described on their respective service pages.

## Frequency and volume

By default, your data is backed up automatically **every day** between 00:00:00 UTC and 01:00:00 UTC, unless you update your settings:

### In GUI

Following changes are available in Zerops GUI. Go to the service detail and choose **Backups List & Configuration** section in the left menu.

- do a one-time backup of your data
- change time of your automatic backup
- turn off backing up your data completely
- view all of your backups
- download a backup
- delete a backup

### Limits

- Each backup is stored for a maximum period of **1 month**
- For each **service** a maximum of **100 backups** is stored
- For each **project** a maximum of **25 GiB** of backup volume is stored. Only full backups are stored, the backup that exceeds the limit by its part is not stored

If you need more backup storage space, contact our support team.

#### Examples

1. If you backup your data every day, and the total volume is less than 25 GiB, the maximum number of backups is ~30 for the last month. A new backup is stored every day (with the oldest one being deleted), unless you exceed the 25 GiB limit.

2. If you backup your data every hour, and the total volume is less than 25 GiB, the total number of backups is 100 for the last 100 hours. A new backup is stored every hour (with the oldest one being deleted), unless you exceed the 25 GiB limit.

3. If you backup your data every hour, and your backups exceed 25 GiB after 50 hours, the total number of backups is 50, unless you delete some of your backups or wait the oldest one is older than 1 month.

## Persistence

Let's say you have a project `my-project`, which contains a PostgreSQL service `db` with backups.

If you delete `db` service, but not `my-project` project, the service backups are kept untouched. The backups will be deleted only after you also delete a project `my-project`. After you delete the project, all project backups are deleted after 7 days.

## High Availability Setup

For services running in HA mode, the backup is created on one of the nodes at random. Other nodes report that the backup is running on another node.

## Encryption and Security

Backups are encrypted as soon as they are created. Here is the process:

* **Key Generation:** We use asymmetric cryptography (X25519) to generate a private key, which is then encrypted using our secret key (RSA-OAEP) and securely stored in our database.
* **Public Key Usage:** The public key is sent to the application, which uses it to encrypt the backup.
* **Decryption:** When a user downloads a backup, it is decrypted using the private key stored safely in our database.

This ensures your data remains secure during both storage and transmission.

All backups are stored in a separate ObjectStorage instance, isolated from the instance accessible by users.

After a project is deleted and the 7-day retention period expires, the project's encryption key is permanently deleted. Once this happens, there is no way to decrypt or restore the backup data.
1 change: 0 additions & 1 deletion apps/docs/content/features/developer-first.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/features/import-export.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/features/remote-dev.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/gingonic/examples.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/gingonic/index.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/medusa/examples.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/medusa/index.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/backups.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/cron.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/env-variables.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/high-availability.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/index.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/log.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/mails.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/migration.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/routing.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/scaling.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/setup-examples.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nestjs/template.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nette/examples.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/nette/index.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/strapi/examples.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/content/frameworks/strapi/index.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/docs/content/help/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Get quick answers to your related questions about Zerops from frequently asked q
recommend visiting our <a href="https://zerops.io/#pricing">pricing page</a> to explore the options that best suit your needs.
</FAQItem>
<FAQItem question="I have more questions. Where can I reach out to get help?">
You can reach us on our <a href="https://discord.gg/xxzmJSDKPT" target="_blank">Discord server</a> for support. For additional contact options, please visit our <a href="http://localhost:3001/help/contacts">contacts page</a>.
You can reach us on our <a href="https://docs.zerops.io/discord" target="_blank">Discord server</a> for support. For additional contact options, please visit our <a href="http://localhost:3001/help/contacts">contacts page</a>.
</FAQItem>
</FAQ>
66 changes: 66 additions & 0 deletions apps/docs/content/object-storage/how-to/curl-file.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Download file from a private bucket with cURL
---

This guide explains how to download a single file from a private Object Storage bucket using cURL and a bash script with Zerops object storage.

## Prerequisites

- Access to Zerops Object Storage
- Storage credentials (`ACCESS_KEY_ID` and `SECRET_ACCESS_KEY`)
- Bash environment
- OpenSSL and cURL installed

:::caution
Store your storage credentials securely and never commit them to version control.
:::

## Script

Save this script as `download-storage.sh`:

```bash
#!/bin/bash

server="${3:-storage-prg1.zerops.io}"
file_path=$2
bucket=$1
set -eu pipefail

contentType="application/octet-stream"
dateValue=`date -R`
signature_string="GET\n\n${contentType}\n${dateValue}\n/${bucket}/${file_path}"

signature_hash=`echo -en ${signature_string} | openssl sha1 -hmac ${SECRET_ACCESS_KEY} -binary | base64`

curl -sSo ${file_path} \
-H "Date: ${dateValue}" \
-H "Content-Type: ${contentType}" \
-H "Authorization: AWS ${ACCESS_KEY_ID}:${signature_hash}" \
"https://${server}/${bucket}/${file_path}"

```

## Usage

1. Make the script executable:
```bash
chmod +x download-storage.sh
```

2. Set your storage credentials as environment variables:
```bash
export ACCESS_KEY_ID=your-access-key
export SECRET_ACCESS_KEY=your-secret-key
```

3. Run the script:
```bash
./download-storage.sh my-bucket file.pdf
```

## Troubleshooting

- **Permission Denied**: Check your `ACCESS_KEY_ID` and `SECRET_ACCESS_KEY`
- **File Not Found**: Verify bucket name and file path
- **Script Error**: Ensure the script has execute permissions
Empty file.
Empty file.
70 changes: 65 additions & 5 deletions apps/docs/content/references/github-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ description: Learn how to integrate your GitHub repositories with Zerops

Discover how to seamlessly integrate your GitHub repository with Zerops for automated builds and deployments.

This guide walks you through the step-by-step process to link your repository, configure triggers, and manage your integrations efficiently.
You can choose between two powerful integration approaches: direct integration through the Zerops GUI for straightforward setup, or GitHub Actions for more customized deployment workflows.

This guide walks you through both integration methods, helping you choose and implement the approach that best fits your team's needs.

---

Expand All @@ -16,9 +18,9 @@ For detailed information on how to create or modify this file, refer to the [Zer

---

## Integration Steps
## Integration via Zerops GUI

Follow these steps to connect your GitHub repository with Zerops:
Follow these steps to connect your GitHub repository directly with Zerops:

1. **Access Service Settings**

Expand Down Expand Up @@ -60,7 +62,7 @@ Zerops requires full access to your repository in order to configure webhooks an

---

## Managing Your GitHub Integration
### Managing Your GitHub Integration

To skip triggering a build for a specific commit, you can include `ci skip` or `skip ci` in your commit message (case insensitive). This tells Zerops to ignore that particular commit during the build process.

Expand All @@ -70,7 +72,7 @@ Although the webhook will still be delivered to GitHub, no action will be taken

---

## Disconnecting Your Repository
### Disconnecting Your Repository

To disconnect your GitHub repository from Zerops:

Expand All @@ -88,3 +90,61 @@ To disconnect your GitHub repository from Zerops:
height="auto"
/>
</p>

---

## GitHub Workflow Integration

As an alternative to direct integration, you can use GitHub Actions to manage your deployments. This approach gives you more control over your deployment workflow and allows integration with other CI/CD processes.

### GitHub Workflow using Zerops Actions

1. **Create Workflow Configuration**

Create a new file at `.github/workflows/deploy.yml` in your repository:

```yaml
name: Deploy to Zerops

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Deploy with Zerops
uses: zeropsio/actions@main
with:
access-token: ${{ secrets.ZEROPS_TOKEN }}
service-id: your-service-id
```
2. **Generate Access Token**
- Navigate to [**Settings > Access Token Management**](https://app.zerops.io/settings/token-management) in your Zerops dashboard
- Generate a new access token with appropriate permissions
- Copy this token for use in GitHub secrets
3. **Locate Service ID**
- Go to your service dashboard and click the three dots menu → **Copy Service ID**
- Alternatively, find it in your service URL: `https://app.zerops.io/service-stack/<your-service-id>/dashboard`

4. **Configure GitHub Secrets**

- Go to your GitHub repository settings
- Navigate to **Settings** > **Secrets and variables** > **Actions** > **Repository secrets**
- Add a new secret named `ZEROPS_TOKEN` with your access token value

:::note
Keep your access token secure and never commit it directly to your repository. The token provides administrative access to your Zerops resources.
:::

For more information about GitHub Actions, refer to the [official GitHub Actions documentation](https://docs.github.com/en/actions).
3 changes: 2 additions & 1 deletion apps/docs/content/references/gitlab-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ Zerops requires full access to configure webhooks and download your code. Your s
4. **Finalize Setup**
- Confirm your settings to complete the integration

<!-- TODO: IMAGE
{/* TODO: IMAGE */}

<p align="center">
<img
src="/img/gui/gitlab-integration.webp"
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/references/import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Tooltip } from 'docs-ui';
The Zerops YAML import scripts provide an intuitive way to manage your projects. You can create and instantiate entire Zerops projects or specific services
with a single click in the Zerops GUI.

You can also use the `zcli import` command. This configuration is a simple way to migrate or replicate your projects or services.
You can also use the `zcli project project-import` (or `zcli project service-import` when importing services only) command. This configuration is a simple way to migrate or replicate your projects or services.

:::info
This is a general guideline; not all keys are valid for every service type. For technology-specific details, refer to the **Create service** page in the **How To** section of the Zerops documentation.
Expand Down
Loading

0 comments on commit d10bec6

Please sign in to comment.