Feat: New contributing section and new guides

This commit is contained in:
ayntk-ai
2024-09-06 18:47:56 +02:00
parent c7a3c0733d
commit 04ca21cf51
9 changed files with 265 additions and 84 deletions

47
CONTRIBUTION.md Normal file
View File

@@ -0,0 +1,47 @@
# Setting up Astro with Extensions for local development
Follow these steps to set up Astro with Starlight and additional extensions:
1. **Install Node.js and npm**
Ensure you have Node.js and npm installed on your system. You can download them from [nodejs.org](https://nodejs.org/).
2. **Fork the documentation-coolify repository and open the folder in a code editor**
3. **Install Astro and Starlight**
Run the following command inside the local repository:
```
npm install astro @astrojs/starlight
```
4. **Install additional Starlight extensions**
Install the required Starlight extensions by running the following command inside the local repository:
```
npm install starlight-openapi starlight-image-zoom starlight-links-validator
```
5. **Install the Astro and MDX VS Code extension (optional)**
Install the Astro and MDX VS Code extension to get syntax highlighting and other useful features:
- [Astro](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode)
- [MDX](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx)
6. **Create your contribution**
Eiter edit a markdown file in the `src/content/docs/` directory or create a new `.mdx` file in the `src/content/docs/` directory and start writing your docs article.
7. **Run your Astro site**
Start the development server by running the following command inside the local repository:
```
npm run dev
```
This will start a local server and give you a URL to preview your changes.
8. **Create a Pull Request**
Create a new pull request from your forked repository to the main documentation-coolify repository.

View File

@@ -57,6 +57,14 @@ export default defineConfig({
collapsed: false,
items: [
{ label: 'FAQ', link: '/knowledge-base/faq' },
{ label: 'Contribute to Coolify', collapsed: true, items: [
{ label: 'Contribute to core Coolify', link: '/knowledge-base/contribute/contribute-to-coolify' },
{ label: 'Add a new service template to Coolify', link: '/knowledge-base/contribute/add-a-service' },
{ label: 'Contribute to the Coolify Documentation', link: '/knowledge-base/contribute/contribute-to-coolify-documentation' },
]
},
{
label: 'Self-hosted Instance', collapsed: true, items: [
{ label: 'Monitoring', link: '/knowledge-base/monitoring' },

73
package-lock.json generated
View File

@@ -9,9 +9,9 @@
"version": "0.0.1",
"dependencies": {
"@astrojs/sitemap": "^3.1.6",
"@astrojs/starlight": "^0.26.1",
"@astrojs/starlight": "^0.26.3",
"@astrojs/starlight-tailwind": "^2.0.3",
"astro": "^4.10.2",
"astro": "^4.15.3",
"sharp": "^0.32.5",
"starlight-image-zoom": "^0.8.0",
"starlight-links-validator": "^0.11.0",
@@ -139,9 +139,10 @@
}
},
"node_modules/@astrojs/starlight": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.26.1.tgz",
"integrity": "sha512-0qNYWZJ+ZOdSfM7du6fGuwUhyTHtAeRIl0zYe+dF0TxDvcakplO1SYLbGGX6lEVYE3PdBne7dcJww85bXZJIIQ==",
"version": "0.26.3",
"resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.26.3.tgz",
"integrity": "sha512-U3rSNwr5cNvJVSPuSncduZ3ioKwNoMAZxYw/riuOfcJeT8DaJua3Uq+Z57vmhI1VxF19BZ1REQ0moUL6nhR8KQ==",
"license": "MIT",
"dependencies": {
"@astrojs/mdx": "^3.1.3",
"@astrojs/sitemap": "^3.1.6",
@@ -539,6 +540,7 @@
"cpu": [
"ppc64"
],
"license": "MIT",
"optional": true,
"os": [
"aix"
@@ -554,6 +556,7 @@
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"android"
@@ -569,6 +572,7 @@
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"android"
@@ -584,6 +588,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"android"
@@ -599,6 +604,7 @@
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -614,6 +620,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -629,6 +636,7 @@
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"freebsd"
@@ -644,6 +652,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"freebsd"
@@ -659,6 +668,7 @@
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -674,6 +684,7 @@
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -689,6 +700,7 @@
"cpu": [
"ia32"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -704,6 +716,7 @@
"cpu": [
"loong64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -719,6 +732,7 @@
"cpu": [
"mips64el"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -734,6 +748,7 @@
"cpu": [
"ppc64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -749,6 +764,7 @@
"cpu": [
"riscv64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -764,6 +780,7 @@
"cpu": [
"s390x"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -779,6 +796,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -794,6 +812,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"netbsd"
@@ -809,6 +828,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"openbsd"
@@ -824,6 +844,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"sunos"
@@ -839,6 +860,7 @@
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
@@ -854,6 +876,7 @@
"cpu": [
"ia32"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
@@ -869,6 +892,7 @@
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
@@ -2155,9 +2179,10 @@
}
},
"node_modules/astro": {
"version": "4.15.1",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.15.1.tgz",
"integrity": "sha512-XvKZ2GaDbCsMfcJess4o+4D4cCKja45GJ/9o6EJ6n96xaen8HZMRoJn3YKL9TOjIrL2NuU4mBFMG2JivPJ0foA==",
"version": "4.15.3",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.15.3.tgz",
"integrity": "sha512-zwO8H+vnNYbrdKz0Pkh2a4B/JK06JUvI18w+FxL3B5u4jqPB/SU+LH9XVUUWdNQsyJ/DBHKAf0LDK0RmwxXQEw==",
"license": "MIT",
"dependencies": {
"@astrojs/compiler": "^2.10.3",
"@astrojs/internal-helpers": "0.4.1",
@@ -2165,7 +2190,7 @@
"@astrojs/telemetry": "3.1.0",
"@babel/core": "^7.25.2",
"@babel/plugin-transform-react-jsx": "^7.25.2",
"@babel/types": "^7.25.4",
"@babel/types": "^7.25.6",
"@oslojs/encoding": "^0.4.1",
"@rollup/pluginutils": "^5.1.0",
"@types/babel__core": "^7.20.5",
@@ -2210,15 +2235,15 @@
"prompts": "^2.4.2",
"rehype": "^13.0.1",
"semver": "^7.6.3",
"shiki": "^1.14.1",
"shiki": "^1.16.1",
"string-width": "^7.2.0",
"strip-ansi": "^7.1.0",
"tinyexec": "^0.3.0",
"tsconfck": "^3.1.1",
"tsconfck": "^3.1.3",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.3",
"vite": "^5.4.2",
"vitefu": "^0.2.5",
"vitefu": "^1.0.2",
"which-pm": "^3.0.0",
"xxhash-wasm": "^1.0.2",
"yargs-parser": "^21.1.1",
@@ -3104,6 +3129,7 @@
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
"integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
@@ -6917,6 +6943,7 @@
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/starlight-image-zoom/-/starlight-image-zoom-0.8.0.tgz",
"integrity": "sha512-+YDqCyihQescGs9hJoyTQt+KHEq9s6zIv8ksBMjPjwOrVicXtY0pM4hHj8yO1r2znud4gTytyGt25kAOmRyP9A==",
"license": "MIT",
"dependencies": {
"rehype-raw": "7.0.0",
"unist-util-visit": "5.0.0",
@@ -6933,6 +6960,7 @@
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/starlight-links-validator/-/starlight-links-validator-0.11.0.tgz",
"integrity": "sha512-7mKiP0xAS8ItKy8QAIkmeNYbzI4w0WD0pOYoTPa1xMNbz+qYr/QWT+a40QO/Z2XYJLzzQn47yomupUfI89wheg==",
"license": "MIT",
"dependencies": {
"github-slugger": "2.0.0",
"hast-util-from-html": "2.0.1",
@@ -6983,6 +7011,7 @@
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/starlight-openapi/-/starlight-openapi-0.7.0.tgz",
"integrity": "sha512-+aqVVqmoFZTb3ibXM6mfl3nmKY/bCZOn5+FTRzOGulEOtG4R8Y8NGwj9HN+6vxLZSPlAPfKwb3ipcAdDbVBuCg==",
"license": "MIT",
"dependencies": {
"@readme/openapi-parser": "2.5.0",
"github-slugger": "2.0.0"
@@ -7658,12 +7687,13 @@
}
},
"node_modules/vite": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz",
"integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==",
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.3.tgz",
"integrity": "sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==",
"license": "MIT",
"dependencies": {
"esbuild": "^0.21.3",
"postcss": "^8.4.41",
"postcss": "^8.4.43",
"rollup": "^4.20.0"
},
"bin": {
@@ -7716,9 +7746,14 @@
}
},
"node_modules/vitefu": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
"integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.2.tgz",
"integrity": "sha512-0/iAvbXyM3RiPPJ4lyD4w6Mjgtf4ejTK6TPvTNG3H32PLwuT0N/ZjJLiXug7ETE/LWtTeHw9WRv7uX/tIKYyKg==",
"license": "MIT",
"workspaces": [
"tests/deps/*",
"tests/projects/*"
],
"peerDependencies": {
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0"
},

View File

@@ -3,7 +3,7 @@
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"dev": "npx astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
@@ -11,9 +11,9 @@
},
"dependencies": {
"@astrojs/sitemap": "^3.1.6",
"@astrojs/starlight": "^0.26.1",
"@astrojs/starlight": "^0.26.3",
"@astrojs/starlight-tailwind": "^2.0.3",
"astro": "^4.10.2",
"astro": "^4.15.3",
"sharp": "^0.32.5",
"starlight-image-zoom": "^0.8.0",
"starlight-links-validator": "^0.11.0",

View File

@@ -1,61 +0,0 @@
---
title: "Add a service"
head:
- tag: "meta"
attrs:
property: "og:title"
content: "How to add a new service to Coolify"
description: "Here you can find the documentation for adding new services to Coolify."
---
import { Aside } from '@astrojs/starlight/components';
Services in Coolify are templates made from normal [docker-compose](https://docs.docker.com/reference/compose-file/) files + a bit of magic.
See [Coolify's docker-compose specs](/docs/knowledge-base/docker/compose) to learn how to benefit from generated variables and storage handling.
## Metadata
You need to add extra metadata to the top of the `docker-compose` file, like:
- documentation link
- a slogan
- additional tags (for better searching)
- logo (local icon, could be svg, png, etc)
- port (always use the port which is the main entrypoint - like frontend - of the service)
<Aside type="caution">
Always add a port, because Caddy Proxy cannot determine the port of the
service automatically.
</Aside>
Example:
```
# documentation: https://docs.n8n.io/hosting/
# slogan: n8n is an extendable workflow automation tool which enables you to connect anything to everything via its open, fair-code model.
# tags: n8n,workflow,automation,open,source,low,code
# logo: svgs/n8n.svg
# port: 5678
... rest of the compose file ...
```
## Add a new service
Official templates stored [here](https://github.com/coollabsio/coolify/blob/main/templates/compose). They are just normal docker-compose files with a bit of magic.
To add a new service, you can easily test your templates with `Docker Compose` deployments inside Coolify. It uses the same process to parse, generate and deploy as the one-click services.
If you are done with tests and everything works, open a [PR](https://github.com/coollabsio/coolify/compare), that have the new `<service>.yaml` compose file under `/templates/compose`.
<Aside type="tip">
Coolify will use a [parsed
version](https://github.com/coollabsio/coolify/blob/main/templates/service-templates.json).
</Aside>
### Request a new service
If there is a service template you'd like to see:
1. Search GitHub discussions [here](https://github.com/coollabsio/coolify/discussions/categories/new-service-integrations).
2. If it has already been requested, upvote it. If not, create a new request.

View File

@@ -0,0 +1,91 @@
---
title: "Add a new service template to Coolify"
head:
- tag: "meta"
attrs:
property: "og:title"
content: "How to add a new service template to Coolify"
description: "Step-by-step guide on adding new service templates to Coolify."
---
import { Aside, Steps } from '@astrojs/starlight/components';
Services in Coolify are templates made from normal [docker-compose](https://docs.docker.com/reference/compose-file/) files with some added Coolify magic.
<Aside type="note">
See [Coolify's docker-compose specs](/docs/knowledge-base/docker/compose#coolifys-magic-environment-variables) to learn more about Coolify's magic and how to benefit from generated variables and storage handling. Please use this magic when submitting your PR to make the merging process smoother.
</Aside>
<Steps>
1. Add metadata
At the top of your `docker-compose` file, add the following metadata:
```yaml
# documentation: https://docs.example.com/
# slogan: A brief description of your service.
# tags: tag1,tag2,tag3
# logo: svgs/your-service.svg
# port: 1234
```
- `documentation`: Link to the service's official documentation
- `slogan`: A short description of the service
- `tags`: Comma-separated list for better searchability
- `logo`: Path to the service's logo (see step 3)
- `port`: The main entrypoint port of the service
<Aside type="caution">
Always specify a port, as Caddy Proxy cannot automatically determine the service's port.
</Aside>
2. Create the docker-compose file
Below the metadata, add your docker-compose configuration. Use Coolify's environment variable magic [here](/docs/knowledge-base/docker/compose#coolifys-magic-environment-variables).
Example:
```yaml
version: '3.8'
services:
app:
image: your-service-image:tag
environment:
- DATABASE_URL=${COOLIFY_DATABASE_URL}
volumes:
- ${COOLIFY_VOLUME_APP}:/data
```
3. Add a logo
- Create or obtain an SVG logo for your service (strongly preferred format)
- If SVG is unavailable, use a high-quality PNG or JPG as a last resort
- Add the logo file to the `svgs` folder in the Coolify repository
- The logo filename should match the docker-compose service name exactly
- For example, if your service name is `wordpress`, your logo should be `wordpress.svg` and the final path then is `svgs/wordpress.svg` use this path in the `logo` metadata.
4. Test your template
Use the `Docker Compose` deployment option in Coolify to test your template. This process mimics the one-click service deployment.
5. Submit a Pull Request
Once your template works correctly:
- Open a [PR](https://github.com/coollabsio/coolify/compare)
- Add your new `<service>.yaml` compose file under `/templates/compose`
- Include the logo file in the `svgs` folder
</Steps>
<Aside type="tip">
Coolify uses a [parsed version](https://github.com/coollabsio/coolify/blob/main/templates/service-templates.json) of the templates for deployment.
</Aside>
## Request a new service
If there's a service template you'd like to see in Coolify:
1. Search [GitHub discussions](https://github.com/coollabsio/coolify/discussions/categories/new-service-integrations) for existing requests.
2. If the service has been requested, upvote it. If not, create a new request.

View File

@@ -0,0 +1,29 @@
---
title: "Contributing to Coolify Documentation"
head:
- tag: "meta"
attrs:
property: "og:title"
content: "How to contribute to Coolify Documentation"
description: "A guide on how to contribute to the Coolify documentation project."
---
import { Aside, LinkButton } from '@astrojs/starlight/components';
We appreciate your interest in contributing to the Coolify documentation! Your contributions help improve the documentation for all users. Before you begin, please take a moment to review our documentation contributing guide.
## Documentation Contributing Guide
For detailed information on how to contribute to the Coolify documentation, please refer to our official contributing guide:
<LinkButton
variant="secondary"
icon="external"
href="https://github.com/coollabsio/documentation-coolify/blob/main/CONTRIBUTING.md"
>
Coolify Documentation Contributing Guide
</LinkButton>
<Aside type="note">
Please read this guide thoroughly before making any contributions, opening issues, or suggesting changes to the documentation.
</Aside>

View File

@@ -0,0 +1,30 @@
---
title: "Contributing to core Coolify"
head:
- tag: "meta"
attrs:
property: "og:title"
content: "How to contribute to Coolify"
description: "A guide on how to contribute to the core Coolify project."
---
import { Aside, LinkButton } from '@astrojs/starlight/components';
We're thrilled that you're interested in contributing to Coolify! Thank you for your time and effort. Your contributions will be part of making Coolify better for everyone. Before you get started, please take a moment to review our comprehensive contributing guide.
## Contributing Guide
For detailed information on how to contribute to Coolify, please refer to our official contributing guide:
<LinkButton
variant="primary"
icon="external"
href="https://github.com/coollabsio/coolify/blob/main/CONTRIBUTING.md"
>
Coolify Contributing Guide
</LinkButton>
<Aside type="note">
Please read this guide thoroughly before making any contributions, opening issues, or asking questions.
</Aside>

View File

@@ -29,7 +29,9 @@ services:
![Coolify's UI for environment variables](../../../../assets/images/screenshots/Docker-compose-environment-variables-UI.png)
Additionally, Coolify can generate some dynamic variables for you.
## Coolify's Magic environment variables
Additionally, Coolify can generate some dynamic environment variables for you.
The syntax is `SERVICE_<TYPE>_<IDENTIFIER>`.
Type may be one of: