Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e278db3c3 | ||
|
|
2390c1053e | ||
|
|
bfe2c40491 | ||
|
|
471e679333 | ||
|
|
dfca1c588a | ||
|
|
6a6c84a061 | ||
|
|
9860eda638 | ||
|
|
6f3ee9f989 | ||
|
|
d441d9178d | ||
|
|
baf438ef28 | ||
|
|
fada2f4c1e | ||
|
|
d46ddc8036 | ||
|
|
b4eb2088de | ||
|
|
26b0788d85 | ||
|
|
d514afe72e |
@@ -0,0 +1,54 @@
|
|||||||
|
## 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 [[Project]] 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: Deploy the Application
|
||||||
|
#### 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
|
||||||
|
```
|
||||||
|
#### Deploying from a git repository
|
||||||
|
## Configuring the .ghaymah.json
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# بسم الله الرحمن الرحيم
|
||||||
|
|
||||||
|
|
||||||
|
> **Note:** Ghaymah CLI is currently supported only on **Linux**.
|
||||||
|
|
||||||
|
To install the cli , run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -sSl https://cli.ghaymah.systems/install.sh | bash
|
||||||
|
```
|
||||||
|
Run
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo $SHELL
|
||||||
|
```
|
||||||
|
|
||||||
|
supported shells:
|
||||||
|
Supported shells: **bash**, **zsh**, **fish**
|
||||||
|
|
||||||
|
### Step 2: Generate the completion script
|
||||||
|
|
||||||
|
For Bash, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gy completion bash >> ~/gy-completion.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 3: Enable command completion
|
||||||
|
|
||||||
|
Run
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo "source ~/gy-completion.sh" >> ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Then restart your terminal
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
## Create project
|
||||||
|
```
|
||||||
|
gy resource project create --set .name="project_name"
|
||||||
|
```
|
||||||
|
Or
|
||||||
|
```bash
|
||||||
|
gy r p c --set .name="project_name"
|
||||||
|
```
|
||||||
|
|
||||||
|
## List the projects :
|
||||||
|
```bash
|
||||||
|
gy resource project get
|
||||||
|
```
|
||||||
|
Or
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gy r p g
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Update on exiting project :
|
||||||
|
```bash
|
||||||
|
gy resource project update project_ID --set .name="new_name"
|
||||||
|
```
|
||||||
|
Or
|
||||||
|
```bash
|
||||||
|
gy r p u update project_ID --set .name="new_name"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Delete project :
|
||||||
|
```bash
|
||||||
|
gy resource project delete project_ID
|
||||||
|
```
|
||||||
|
Or
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gy r p d project_ID
|
||||||
|
```
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user