@@ -48,97 +48,6 @@ Example:
48
48
feat: add new feature
49
49
```
50
50
51
- ## Setup
52
-
53
- 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.
54
-
55
- ``` bash
56
- git clone https://github.com/dokploy/dokploy.git
57
- cd dokploy
58
- pnpm install
59
- cp apps/dokploy/.env.example apps/dokploy/.env
60
- ```
61
-
62
- ## Development
63
-
64
- Is required to have ** Docker** installed on your machine.
65
-
66
- ### Setup
67
-
68
- Run the command that will spin up all the required services and files.
69
-
70
- ``` bash
71
- pnpm run dokploy:setup
72
- ```
73
-
74
- Run this script
75
- ``` bash
76
- pnpm run server:script
77
- ```
78
-
79
- Now run the development server.
80
-
81
- ``` bash
82
- pnpm run dokploy:dev
83
- ```
84
-
85
- Go to http://localhost:3000 to see the development server
86
-
87
- ## Build
88
-
89
- ``` bash
90
- pnpm run dokploy:build
91
- ```
92
-
93
- ## Docker
94
-
95
- To build the docker image
96
-
97
- ``` bash
98
- pnpm run docker:build
99
- ```
100
-
101
- To push the docker image
102
-
103
- ``` bash
104
- pnpm run docker:push
105
- ```
106
-
107
- ## Password Reset
108
-
109
- In the case you lost your password, you can reset it using the following command
110
-
111
- ``` bash
112
- pnpm run reset-password
113
- ```
114
-
115
- If you want to test the webhooks on development mode using localtunnel, make sure to install ` localtunnel `
116
-
117
- ``` bash
118
- bunx lt --port 3000
119
- ```
120
-
121
- If you run into permission issues of docker run the following command
122
-
123
- ``` bash
124
- sudo chown -R USERNAME dokploy or sudo chown -R $( whoami) ~ /.docker
125
- ```
126
-
127
- ## Application deploy
128
-
129
- In case you want to deploy the application on your machine and you selected nixpacks or buildpacks, you need to install first.
130
-
131
- ``` bash
132
- # Install Nixpacks
133
- curl -sSL https://nixpacks.com/install.sh -o install.sh \
134
- && chmod +x install.sh \
135
- && ./install.sh
136
- ```
137
-
138
- ``` bash
139
- # Install Buildpacks
140
- 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
141
- ```
142
51
143
52
## Pull Request
144
53
@@ -153,95 +62,6 @@ curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.32.1/pack-v0.
153
62
154
63
Thank you for your contribution!
155
64
156
- ## Templates
157
-
158
- To add a new template, go to ` templates ` folder and create a new folder with the name of the template.
159
-
160
- Let's take the example of ` plausible ` template.
161
-
162
- 1 . create a folder in ` templates/plausible `
163
- 2 . create a ` docker-compose.yml ` file inside the folder with the content of compose.
164
- 3 . create a ` index.ts ` file inside the folder with the following code as base:
165
- 4 . When creating a pull request, please provide a video of the template working in action.
166
-
167
- ``` typescript
168
- // EXAMPLE
169
- import {
170
- generateHash ,
171
- generateRandomDomain ,
172
- type Template ,
173
- type Schema ,
174
- type DomainSchema ,
175
- } from " ../utils" ;
176
-
177
- export function generate(schema : Schema ): Template {
178
- // do your stuff here, like create a new domain, generate random passwords, mounts.
179
- const mainServiceHash = generateHash (schema .projectName );
180
- const mainDomain = generateRandomDomain (schema );
181
- const secretBase = generateBase64 (64 );
182
- const toptKeyBase = generateBase64 (32 );
183
-
184
- const domains: DomainSchema [] = [
185
- {
186
- host: mainDomain ,
187
- port: 8000 ,
188
- serviceName: " plausible" ,
189
- },
190
- ];
191
-
192
- const envs = [
193
- ` BASE_URL=http://${mainDomain } ` ,
194
- ` SECRET_KEY_BASE=${secretBase } ` ,
195
- ` TOTP_VAULT_KEY=${toptKeyBase } ` ,
196
- ` HASH=${mainServiceHash } ` ,
197
- ];
198
-
199
- const mounts: Template [" mounts" ] = [
200
- {
201
- mountPath: " ./clickhouse/clickhouse-config.xml" ,
202
- content: ` some content...... ` ,
203
- },
204
- ];
205
-
206
- return {
207
- envs ,
208
- mounts ,
209
- domains ,
210
- };
211
- }
212
- ```
213
-
214
- 4 . Now you need to add the information about the template to the ` templates/templates.ts ` is a object with the following properties:
215
-
216
- ** 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.**
217
-
218
- ``` typescript
219
- {
220
- id : " plausible" ,
221
- name : " Plausible" ,
222
- version : " v2.1.0" ,
223
- description :
224
- " Plausible is a open source, self-hosted web analytics platform that lets you track website traffic and user behavior." ,
225
- logo : " plausible.svg" , // we defined the name and the extension of the logo
226
- links : {
227
- github : " https://github.com/plausible/plausible" ,
228
- website : " https://plausible.io/" ,
229
- docs : " https://plausible.io/docs" ,
230
- },
231
- tags : [" analytics" ],
232
- load : () => import (" ./plausible/index" ).then ((m ) => m .generate ),
233
- },
234
- ```
235
-
236
- 5 . Add the logo or image of the template to ` public/templates/plausible.svg `
237
-
238
- ### Recomendations
239
-
240
- - Use the same name of the folder as the id of the template.
241
- - The logo should be in the public folder.
242
- - If you want to show a domain in the UI, please add the prefix \_ HOST at the end of the variable name.
243
- - Test first on a vps or a server to make sure the template works.
244
-
245
65
## Docs
246
66
247
67
To run the docs locally, run the following command:
0 commit comments