Skip to content

Commit

Permalink
feat: add phpmyadmin (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
erfjab authored Dec 26, 2024
1 parent 6a39365 commit 2f049be
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 8 deletions.
4 changes: 0 additions & 4 deletions content/docs/marzneshin/commands/_index.fa.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ marzneshin status
marzneshin logs
```

#### نصب مرزنشین
```bash
marzneshin install
```

#### به روزرسانی به آخرین ورژن
```bash
Expand Down
4 changes: 0 additions & 4 deletions content/docs/marzneshin/commands/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ marzneshin status
marzneshin logs
```

#### Install Marzneshin
```bash
marzneshin install
```

#### Update latest version
```bash
Expand Down
54 changes: 54 additions & 0 deletions content/docs/marzneshin/phpmyadmin/_index.fa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---

title: phpmyadmin
weight: 6

---

`phpMyAdmin` یک ابزار قدرتمند و کاربرپسند برای مدیریت دیتابیس‌های MySQL/MariaDB از طریق رابط وب است. این ابزار به شما امکان می‌دهد تا کوئری‌ها اجرا کنید، جداول را مدیریت کنید، و تنظیمات دیتابیس را به‌راحتی تغییر دهید. برای راه‌اندازی `phpMyAdmin` در مرزنشین، مراحل زیر را دنبال کنید.

{{% steps %}}

### ویرایش فایل Docker Compose

```bash
nano /etc/opt/marzneshin/docker-compose.yml
```

### افزودن سرویس phpMyAdmin

توجه داشته باشید:
- **فاصله‌ها** در فایل YAML بسیار مهم هستند.
- می‌توانید **پورت‌ها** را بر اساس نیاز خود تغییر دهید.

```yaml
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: always
env_file: .env
network_mode: host
environment:
PMA_HOST: 127.0.0.1
PMA_PORT: 3306
APACHE_PORT: 8010
UPLOAD_LIMIT: 1024M
depends_on:
- db
```
### ریستارت سرویس مرزنشین
```bash
marzneshin restart
```

اکنون `phpMyAdmin` آماده است و می‌توانید با وارد کردن آدرس `http://IP:PORT` در مرورگر خود، به صفحه‌ی مدیریت آن دسترسی پیدا کنید. از یوزرنیم `root` و پسورد دیتابیس خود برای ورود استفاده کنید.

{{< callout type="warning" >}}

⚠️ **هشدار:**
لطفاً در دیتابیس خود تغییراتی اعمال نکنید و یا پیش از اعمال هرگونه تغییر، حتماً یک نسخه‌ی پشتیبان (بکاپ) تهیه کنید.

{{< /callout >}}

{{% /steps %}}
52 changes: 52 additions & 0 deletions content/docs/marzneshin/phpmyadmin/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: phpmyadmin
weight: 6
---

`phpMyAdmin` is a powerful and user-friendly tool for managing MySQL/MariaDB databases through a web-based interface. It allows you to execute queries, manage tables, and configure database settings with ease. Follow the steps below to set up `phpMyAdmin` in Marzneshin.

{{% steps %}}

### Edit the Docker Compose File

```bash
nano /etc/opt/marzneshin/docker-compose.yml
```

### Add the phpMyAdmin Service

Please note:
- **Indentation** in YAML files is crucial.
- You can **adjust ports** as needed.

```yaml
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: always
env_file: .env
network_mode: host
environment:
PMA_HOST: 127.0.0.1
PMA_PORT: 3306
APACHE_PORT: 8010
UPLOAD_LIMIT: 1024M
depends_on:
- db
```
### Restart the Marzneshin Service
```bash
marzneshin restart
```

Now `phpMyAdmin` is ready, and you can access it by navigating to `http://IP:PORT` in your browser. Use the `root` username and your database password to log in.

{{< callout type="warning" >}}

⚠️ **Warning:**
Please avoid making changes to your database directly. Always take a backup before applying any modifications.

{{< /callout >}}

{{% /steps %}}
1 change: 1 addition & 0 deletions content/docs/marznode/_index.fa.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ weight: 2
{{< cards >}}
{{< card link="install/" title="نصب">}}
{{< card link="core/" title="کانفیگ هسته">}}
{{< card link="varibles/" title="متغیرها">}}
{{< card link="script/" title="اسکریپت ها">}}
{{< /cards >}}
1 change: 1 addition & 0 deletions content/docs/marznode/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ weight: 2
{{< cards >}}
{{< card link="install/" title="Install">}}
{{< card link="core/" title="Config Core">}}
{{< card link="varibles/" title="Varibles">}}
{{< card link="script/" title="Scripts">}}
{{< /cards >}}

0 comments on commit 2f049be

Please sign in to comment.