Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b01c0a64be | ||
|
|
1eaaf00f63 | ||
|
|
17feae0491 | ||
|
|
dee9c1b220 | ||
|
|
6714506b3f |
@@ -1,98 +0,0 @@
|
||||
# What is an Application?
|
||||
|
||||
When working with the Ghaymah CLI, an **Application** is the central resource you’ll interact with.
|
||||
It’s not just source code it’s a deployable unit wrapped in a container, ready to run anywhere.
|
||||
|
||||
Think of an Application as the thing you **create, launch, update, and monitor** through the CLI.
|
||||
Everything else like containers, configs, and logs revolves around it.
|
||||
|
||||
> **Note:** A **Project must be created first** before you can initialize or launch an Application.
|
||||
> The Project acts as the parent workspace that organizes your Applications and related resources.
|
||||
|
||||
---
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```bash
|
||||
gy resource app [command]
|
||||
```
|
||||
|
||||
Aliases: app, a
|
||||
|
||||
> **Tip:** You can use -h or --help to see all available options.
|
||||
|
||||
```bash
|
||||
gy resource app --help
|
||||
```
|
||||
|
||||
## creating an application
|
||||
|
||||
### step 1: Initialize the Application
|
||||
|
||||
Run the following command to create a new application:
|
||||
|
||||
```bash
|
||||
gy resource app init -p project_id
|
||||
```
|
||||
|
||||
>If you don’t know your project ID or haven’t created a project yet, see the [Projects](Project.md) documentation.
|
||||
|
||||
#### Flags
|
||||
|
||||
| Flag | what does it do | comment |
|
||||
| ------------- | ------------------------- | ------------------------------------ |
|
||||
| -p project_id | specifies the project id | required |
|
||||
| -n name | Sets the application name | Optional, defaults to directory name |
|
||||
|
||||
### Step 2: deploying from a Dockerfile
|
||||
|
||||
To deploy using a **Dockerfile**, ensure that:
|
||||
|
||||
- A `Dockerfile` exists in the project directory.
|
||||
- All necessary files referenced by the `Dockerfile` are present in the same directory.
|
||||
|
||||
Once these requirements are met, deploy the application with:
|
||||
|
||||
```bash
|
||||
gy resource app launch
|
||||
```
|
||||
|
||||
## Configuring the .ghaymah.json
|
||||
|
||||
Example `.ghaymah.json`
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "ac2d8eb7-ff49-4b8d-9a8e-92cd3aae22a6",
|
||||
"name": "nginx",
|
||||
"projectId": "b887e332-3ecd-4187-bdfb-17d8a437833e",
|
||||
"ports": [
|
||||
{
|
||||
"expose": true,
|
||||
"number": 80
|
||||
}
|
||||
],
|
||||
"publicAccess": {
|
||||
"enabled": true,
|
||||
"domain": "auto"
|
||||
},
|
||||
"resourceTier": "t1",
|
||||
"dockerFileName": "Dockerfile"
|
||||
}
|
||||
```
|
||||
|
||||
### Changing values
|
||||
|
||||
You can change **name**, exposed port, and **dockerFileName** freely.
|
||||
>you can only have one port per application.
|
||||
>
|
||||
### Adding environment variables
|
||||
|
||||
Add an `env` object to the top-level JSON.Example:
|
||||
|
||||
```json
|
||||
"env": {
|
||||
"foo": "bar",
|
||||
"port": 8080
|
||||
}
|
||||
```
|
||||
@@ -4,3 +4,4 @@ RUN npm install -g docsify-cli
|
||||
COPY . .
|
||||
EXPOSE 3000
|
||||
CMD ["docsify", "serve", ".","-p", "3000"]
|
||||
|
||||
|
||||
-98
@@ -1,98 +0,0 @@
|
||||
# Projects
|
||||
|
||||
Projects are the foundation of resource organization in Ghaymah CLI. They provide a structured way to group and manage your resources, making it easier to maintain complex deployments and collaborate with team members.
|
||||
|
||||
|
||||
|
||||
## Commands Reference
|
||||
|
||||
### Creating a Project
|
||||
|
||||
Create a new project with a specified name:
|
||||
|
||||
```bash
|
||||
gy resource project create --set .name="my-awesome-project"
|
||||
```
|
||||
|
||||
**Short form:**
|
||||
```bash
|
||||
gy r p c --set .name="my-awesome-project"
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# Create a project for a web application
|
||||
gy resource project create --set .name="web-app-frontend"
|
||||
```
|
||||
|
||||
### Listing Projects
|
||||
|
||||
View all existing projects:
|
||||
|
||||
```bash
|
||||
gy resource project get
|
||||
```
|
||||
|
||||
**Short form:**
|
||||
```bash
|
||||
gy r p g
|
||||
```
|
||||
|
||||
|
||||
### Updating a Project
|
||||
|
||||
Modify an existing project's properties:
|
||||
|
||||
```bash
|
||||
gy resource project update <PROJECT_ID> --set .name="updated-name"
|
||||
```
|
||||
|
||||
**Short form:**
|
||||
```bash
|
||||
gy r p u <PROJECT_ID> --set .name="updated-name"
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# Update project name
|
||||
gy resource project update proj_123abc --set .name="web-app-backend"
|
||||
```
|
||||
|
||||
### Deleting a Project
|
||||
|
||||
Remove a project and all its associated resources:
|
||||
|
||||
```bash
|
||||
gy resource project delete <PROJECT_ID>
|
||||
```
|
||||
|
||||
**Short form:**
|
||||
```bash
|
||||
gy r p d <PROJECT_ID>
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# Delete project by ID
|
||||
gy resource project delete proj_123abc
|
||||
```
|
||||
|
||||
> ⚠️ **Warning**: Deleting a project will permanently remove all associated resources. This action cannot be undone.
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Naming Conventions
|
||||
- Use descriptive names: `web-app-frontend`, `api-service-v2`
|
||||
- Include environment indicators: `my-app-staging`, `my-app-production`
|
||||
- Keep names concise but meaningful
|
||||
|
||||
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `gy resource --help` - View all resource management commands
|
||||
- `gy resource project --help` - View all project management commands
|
||||
|
||||
---
|
||||
|
||||
|
||||
+11
-3
@@ -1,4 +1,12 @@
|
||||
- [About Ghaymah CLI](about-ghaymah-cli.md)
|
||||
|
||||
- [Getting Started](getting-started.md)
|
||||
<!-- - [Integrations](features/integrations.md) -->
|
||||
- [Projects](Project.md)
|
||||
- [Application](Application.md)
|
||||
|
||||
- [Using CLI](using-cli.md)
|
||||
|
||||
- Features
|
||||
- [Integrations](features/integrations.md)
|
||||
- [Projects](features/Projects.md)
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-40
@@ -7,33 +7,15 @@ This topic describes how to install the latest release of **Ghaymah Command Line
|
||||
## Ghaymah CLI Install Instructions
|
||||
|
||||
### Installation
|
||||
<!-- tabs:start -->
|
||||
|
||||
#### **Linux**
|
||||
<!-- tabs:start -->
|
||||
|
||||
#### **Debian**
|
||||
|
||||
Download & Install
|
||||
|
||||
#### **Step 1:** Download & Install
|
||||
Run the following command to install the latest release of the Ghaymah CLI:
|
||||
|
||||
```bash
|
||||
curl -sSl https://cli.ghaymah.systems/install.sh | bash
|
||||
```
|
||||
|
||||
#### **Redhat**
|
||||
|
||||
1.Download & Install
|
||||
|
||||
Run the following command to install the latest release of the Ghaymah CLI:
|
||||
|
||||
```bash
|
||||
curl -sSl https://cli.ghaymah.systems/install.sh | bash
|
||||
```
|
||||
|
||||
2.update PATH
|
||||
|
||||
#### **Step 2:** Update PATH
|
||||
Add the CLI to your PATH and reload your shell configuration:
|
||||
|
||||
```bash
|
||||
@@ -41,19 +23,7 @@ echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
#### **Macos**
|
||||
|
||||
Bonjour!
|
||||
|
||||
#### **Windows**
|
||||
|
||||
Ciao!
|
||||
|
||||
<!-- tabs:end -->
|
||||
### Verifying Installation
|
||||
|
||||
#### **Step 3:** Verify Installation
|
||||
Check that the CLI is installed correctly:
|
||||
|
||||
```bash
|
||||
@@ -73,17 +43,15 @@ Latest version: xx.xx.xx
|
||||
### Enable Auto-Completion
|
||||
|
||||
#### **Step 1:** Check Your Shell
|
||||
|
||||
Run the following command to check which shell you are using:
|
||||
|
||||
```bash
|
||||
echo $SHELL
|
||||
```
|
||||
|
||||
> **Supported shells:** `bash`, `zsh`, `fish`
|
||||
> ** Supported shells:** `bash`, `zsh`, `fish`
|
||||
|
||||
#### **Step 2:** Enable Shell Completion
|
||||
|
||||
Enable shell completion to get command suggestions and auto-completion.
|
||||
|
||||
**For Bash**, run:
|
||||
@@ -103,20 +71,17 @@ echo "source ~/gy-completion.sh" >> ~/.bashrc
|
||||
---
|
||||
|
||||
### Authentication
|
||||
|
||||
Before using the Ghaymah CLI, you need to authenticate your account.
|
||||
|
||||
If you don't have an account yet, you can create one by visiting the Ghaymah website:
|
||||
If you don’t have an account yet, you can create one by visiting the Ghaymah website:
|
||||
[Ghaymah systems](https://ghaymah.systems/)
|
||||
|
||||
After creating your account, return to the CLI and run the following command to log in.
|
||||
|
||||
```bash
|
||||
gy auth login
|
||||
```
|
||||
|
||||
You will be prompted to enter your email and password:
|
||||
|
||||
```bash
|
||||
Email:
|
||||
Password:
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
create project
|
||||
> gy resource project create --set .name="project_name"
|
||||
Aliases:
|
||||
> gy r p c --set .name="project_name"
|
||||
|
||||
|
||||
|
||||
list the projects:
|
||||
> gy resource project get
|
||||
Aliases:
|
||||
> gy r p g
|
||||
|
||||
|
||||
update om project:
|
||||
> gy resource project update project_ID --set .name="new_name"
|
||||
Aliases:
|
||||
> gy r p u update project_ID --set .name="new_name"
|
||||
|
||||
|
||||
Delete project:
|
||||
> gy resource project delete project_ID
|
||||
Aliases:
|
||||
> gy r p d project_ID
|
||||
|
||||
|
||||
+8
-27
@@ -1,41 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover" />
|
||||
<!-- <meta name="description" content=""> -->
|
||||
<title>Ghaymah cloud documentation</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable/dist/css/theme-simple-dark.css" />
|
||||
<!-- Custom Styles -->
|
||||
<style>
|
||||
:root {
|
||||
--sidebar-width: 20rem;
|
||||
}
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<title>Ghaymah Docs</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable/dist/css/theme-simple-dark.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">Loading...</div>
|
||||
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: "Ghaymah Docs",
|
||||
name: 'Ghaymah Docs',
|
||||
loadSidebar: true,
|
||||
subMaxLevel: 3,
|
||||
};
|
||||
subMaxLevel: 3
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Required -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/js/docsify-themeable.min.js"></script>
|
||||
|
||||
Recommended
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user