Skip to content

Commit

Permalink
chore: remove unsued files
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Oct 28, 2024
1 parent 738b8e5 commit dc351dc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 293 deletions.
91 changes: 0 additions & 91 deletions CONTRIBUTING.md

This file was deleted.

180 changes: 0 additions & 180 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,97 +48,6 @@ Example:
feat: add new feature
```

## Setup

Before you start, please make the clone based on the `canary` branch, since the `main` branch is the source of truth and should always reflect the latest stable release, also the PRs will be merged to the `canary` branch.

```bash
git clone https://github.com/dokploy/dokploy.git
cd dokploy
pnpm install
cp apps/dokploy/.env.example apps/dokploy/.env
```

## Development

Is required to have **Docker** installed on your machine.

### Setup

Run the command that will spin up all the required services and files.

```bash
pnpm run dokploy:setup
```

Run this script
```bash
pnpm run server:script
```

Now run the development server.

```bash
pnpm run dokploy:dev
```

Go to http://localhost:3000 to see the development server

## Build

```bash
pnpm run dokploy:build
```

## Docker

To build the docker image

```bash
pnpm run docker:build
```

To push the docker image

```bash
pnpm run docker:push
```

## Password Reset

In the case you lost your password, you can reset it using the following command

```bash
pnpm run reset-password
```

If you want to test the webhooks on development mode using localtunnel, make sure to install `localtunnel`

```bash
bunx lt --port 3000
```

If you run into permission issues of docker run the following command

```bash
sudo chown -R USERNAME dokploy or sudo chown -R $(whoami) ~/.docker
```

## Application deploy

In case you want to deploy the application on your machine and you selected nixpacks or buildpacks, you need to install first.

```bash
# Install Nixpacks
curl -sSL https://nixpacks.com/install.sh -o install.sh \
&& chmod +x install.sh \
&& ./install.sh
```

```bash
# Install Buildpacks
curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.32.1/pack-v0.32.1-linux.tgz" | tar -C /usr/local/bin/ --no-same-owner -xzv pack
```

## Pull Request

Expand All @@ -153,95 +62,6 @@ curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.32.1/pack-v0.

Thank you for your contribution!

## Templates

To add a new template, go to `templates` folder and create a new folder with the name of the template.

Let's take the example of `plausible` template.

1. create a folder in `templates/plausible`
2. create a `docker-compose.yml` file inside the folder with the content of compose.
3. create a `index.ts` file inside the folder with the following code as base:
4. When creating a pull request, please provide a video of the template working in action.

```typescript
// EXAMPLE
import {
generateHash,
generateRandomDomain,
type Template,
type Schema,
type DomainSchema,
} from "../utils";

export function generate(schema: Schema): Template {
// do your stuff here, like create a new domain, generate random passwords, mounts.
const mainServiceHash = generateHash(schema.projectName);
const mainDomain = generateRandomDomain(schema);
const secretBase = generateBase64(64);
const toptKeyBase = generateBase64(32);

const domains: DomainSchema[] = [
{
host: mainDomain,
port: 8000,
serviceName: "plausible",
},
];

const envs = [
`BASE_URL=http://${mainDomain}`,
`SECRET_KEY_BASE=${secretBase}`,
`TOTP_VAULT_KEY=${toptKeyBase}`,
`HASH=${mainServiceHash}`,
];

const mounts: Template["mounts"] = [
{
mountPath: "./clickhouse/clickhouse-config.xml",
content: `some content......`,
},
];

return {
envs,
mounts,
domains,
};
}
```

4. Now you need to add the information about the template to the `templates/templates.ts` is a object with the following properties:

**Make sure the id of the template is the same as the folder name and don't have any spaces, only slugified names and lowercase.**

```typescript
{
id: "plausible",
name: "Plausible",
version: "v2.1.0",
description:
"Plausible is a open source, self-hosted web analytics platform that lets you track website traffic and user behavior.",
logo: "plausible.svg", // we defined the name and the extension of the logo
links: {
github: "https://github.com/plausible/plausible",
website: "https://plausible.io/",
docs: "https://plausible.io/docs",
},
tags: ["analytics"],
load: () => import("./plausible/index").then((m) => m.generate),
},
```

5. Add the logo or image of the template to `public/templates/plausible.svg`

### Recomendations

- Use the same name of the folder as the id of the template.
- The logo should be in the public folder.
- If you want to show a domain in the UI, please add the prefix \_HOST at the end of the variable name.
- Test first on a vps or a server to make sure the template works.

## Docs

To run the docs locally, run the following command:
Expand Down
22 changes: 0 additions & 22 deletions TERMS_AND_CONDITIONS.md

This file was deleted.

0 comments on commit dc351dc

Please sign in to comment.