Skip to content

Commit

Permalink
feat: add databases connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Nov 10, 2024
1 parent b53b13b commit 1701fc3
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 124 deletions.
58 changes: 0 additions & 58 deletions apps/docs/content/docs/core/applications/providers.mdx

This file was deleted.

18 changes: 15 additions & 3 deletions apps/docs/content/docs/core/auto-deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Auto deploy is only valid for the following services:

- Applications
- Docker Compose
- Templates Open Source

## Github

Expand Down Expand Up @@ -62,9 +61,22 @@ Webhooks allow you to automatically deploy your application whenever changes are
The steps are almost the same for all the Git providers, GitHub, GitLab, Bitbucket, Gitea.
</Callout>

### API Method

Deploy your application programmatically using the Dokploy API from anywhere.
## Dockerhub (Only Applications)

To setup auto deploys for Dockerhub, follow the steps below:

1. Go to your application and select `Deployments` tab.
2. Copy the `Webhook URL`.
3. Go to your Dockerhub repository and select `Webhooks` tab.
4. Set a name for the webhook and paste the `Webhook URL` copied in step 2.
5. That's it, now every time you push to your repository, your application will trigger a deployment in dokploy.

The deployment will trigger only if the `Tag` matches the one specified in Dokploy.

## API Method

Deploy your application programmatically using the Dokploy API from anywhere, this is useful when you want to trigger a deployment from a CI/CD pipeline or from a script.

### Steps to Deploy Using API

Expand Down
19 changes: 19 additions & 0 deletions apps/docs/content/docs/core/databases/connection/mariadb.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: MariaDB
description: This guide will cover how to connect from Beekeeper Studio to your mariadb databases in dokploy.
---

1. Download and install Beekeeper Studio [Beekeeper Studio](https://www.beekeeperstudio.io/get).
2. Go to your `mariadb` databases.
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `3307` and click `Save`.
4. It will display the `External Connection URL` eg. `mysql://user:[email protected]:3306/database`.

Open Beekeeper Studio and follow the steps:

1. Click on `Add New Server`.
2. Select `MariaDB` as the `Database Type`.
3. Use `Import URL` to enter the `External Connection URL` from Dokploy eg. `mysql://user:[email protected]:3306/database`.
4. Click on `Connect`.
5. Click on `Save`.

Done! now you can manage the database from Beekeeper Studio.
18 changes: 18 additions & 0 deletions apps/docs/content/docs/core/databases/connection/mongo-atlas.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Mongo Compass
description: This guide will cover how to configure a Mongo Compass connection for your applications in dokploy or panel.
---

1. Download and install Mongo Compass [Mongo Compass](https://www.mongodb.com/try/download/compass).
2. Go to your `MongoDB` databases.
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `27017` and click `Save`.
4. It will display the `External Connection URL` eg. `mongodb://user:[email protected]:27017/database`.

Open Mongo Compass and follow the steps:

1. Click on `Add Connection`.
2. Copy and paste the `External Connection URL` eg. `mongodb://user:[email protected]:27017/database`.
3. Click on `Connect`.


Done! now you can manage the database from Mongo Compass.
19 changes: 19 additions & 0 deletions apps/docs/content/docs/core/databases/connection/mysql.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: MySQL
description: This guide will cover how to connect from Beekeeper Studio to your mysql databases in dokploy.
---

1. Download and install Beekeeper Studio [Beekeeper Studio](https://www.beekeeperstudio.io/get).
2. Go to your `mysql` databases.
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `3306` and click `Save`.
4. It will display the `External Connection URL` eg. `mysql://user:[email protected]:3306/database`.

Open Beekeeper Studio and follow the steps:

1. Click on `Add New Server`.
2. Select `MySQL` as the `Database Type`.
3. Use `Import URL` to enter the `External Connection URL` from Dokploy eg. `mysql://user:[email protected]:3306/database`.
4. Click on `Connect`.
5. Click on `Save`.

Done! now you can manage the database from Beekeeper Studio.
24 changes: 24 additions & 0 deletions apps/docs/content/docs/core/databases/connection/pg-admin.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: PG Admin
description: This guide will cover how to connect from pgAdmin to your postgres databases in dokploy.
---

1. Download and install pgAdmin [pgAdmin](https://www.pgadmin.org/download/).
2. Go to your `postgres` databases.
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `5433` and click `Save`.
4. It will display the `External Connection URL` eg. `postgres://user:[email protected]:5433/database`.


Open pgAdmin and follow the steps:

1. Click on `Add New Server`.
2. Enter the `Server Name` eg. `dokploy`.
3. Enter to `Connection`.
4. In Hostname/Address enter the IP from the server where the database is hosted eg. `1.2.4.5`.
5. In Port enter the port where the database is running eg. `5433`.
6. In Database enter the name of the database eg. `database`.
7. In Username enter the username eg. `user`.
8. In Password enter the password eg. `password`.
9. Click on `Save`.

Done! now you can manage the database from pgAdmin.
21 changes: 21 additions & 0 deletions apps/docs/content/docs/core/databases/connection/redis.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Redis
description: This guide will cover how to connect from RedisInsight to your redis databases in dokploy.
---

1. Download and install RedisInsight [RedisInsight](https://redis.io/insight/).
2. Go to your `redis` databases.
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `6379` and click `Save`.
4. It will display the `External Connection URL` eg. `redis://user:[email protected]:6379/database`.

Open RedisInsight and follow the steps:


1. Add Redis Database.
2. Enter the `Host` eg. `1.2.4.5`.
3. Enter the `Port` eg. `6379`.
4. Enter the username eg. `default`.
5. Enter the `Password` eg. `password`.
6. Click on `Save`.

Done! now you can manage the database from RedisInsight.
49 changes: 0 additions & 49 deletions apps/docs/content/docs/core/docker-compose/providers.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions apps/docs/content/docs/core/domains/cloudflare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ We assume that you have enabled the `Full (Strict)` mode in the previous step, i
6. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`.
7. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`.
8. Click `Save`.
9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose` or `Templates Open Source`.
9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`.
10. Go to `Domains` section.
11. Click `Create Domain`.
12. In the `Host` field, enter the domain name eg. `api.dokploy.com`.
Expand All @@ -76,7 +76,7 @@ We assume that you have enabled the `Flexible` mode in the previous step, is sup
6. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`.
7. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`.
8. Click `Save`.
9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose` or `Templates Open Source`.
9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`.
10. Go to `Domains` section.
11. Click `Create Domain`.
12. In the `Host` field, enter the domain name eg. `api.dokploy.com`.
Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/core/domains/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Domains are supported for:

- **Applications**
- **Docker Compose**
- **Templates Open Source**


## Requirements (Optional)
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/core/domains/others.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In the case you don't want to use Cloudflare, you can use any domain from any pr
5. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`.
6. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`.
7. Click `Save`.
8. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose` or `Templates Open Source`.
8. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`.
9. Go to `Domains` section.
10. Click `Create Domain`.
11. In the `Host` field, enter the domain name eg. `api.dokploy.com`.
Expand Down
33 changes: 23 additions & 10 deletions apps/docs/content/docs/core/providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ description: Learn how to use providers in your application or docker compose.

Dokploy offers several deployment methods, streamlining the process whether you're utilizing GitHub, any Git provider, Docker, or automated deployments.

- GitHub
- Gitlab
- Bitbucket
- Git
- Docker (Only Applications)
- Drag and Drop .zip (Only Applications)
- Raw (Only Docker Compose)
1. GitHub
2. Gitlab
3. Bitbucket
4. Git
5. Docker (Only Applications)
6. Drag and Drop .zip (Only Applications)
7. Raw (Only Docker Compose)

## GitHub, Gitlab, Bitbucket

Expand Down Expand Up @@ -55,8 +55,21 @@ This is for Github, but the same applies for Gitlab, Bitbucket, Gitea, etc.
This enables you to pull repositories from your private repository, a method consistent across nearly all providers,
remember to use the SSH URL `[email protected]:user/repo.git` and not the HTTPS URL `https://github.com/user/repo.git`.

## Docker
## Docker (Applications)

For Docker deployments:
For Docker deployments you have two options:

1. Login to your registry using the [Registry Section](/docs/core/registry) and it automatically will pull the image from the registry in the case of a private registry.
2. Provide the username and password directly in the application settings.


## Drag and Drop .zip (Applications)

You can upload a zip file directly from your computer and trigger a deployment.



## Raw (Docker Compose)

You specify a docker compose file directly in the code editor and trigger a deployment.

- Provide a Docker image. For private repositories, enter the username and password.

0 comments on commit 1701fc3

Please sign in to comment.