Organizing contributing

This commit is contained in:
Gabriel Engel 2022-11-07 18:44:47 -03:00
parent 3b9b3f8ffa
commit 0ea1e71808
9 changed files with 111 additions and 45 deletions

View File

@ -1,57 +1,43 @@
# Contribution # Contributing
First, thanks for considering to contribute to my project. It really means a lot! :) > "First, thanks for considering to contribute to my project.
It really means a lot! 😁" - [@andrasbacsai](https://github.com/andrasbacsai)
You can ask for guidance anytime on our Discord server in the #contribution channel. You can ask for guidance anytime on our
[Discord server](https://coollabs.io/discord) in the `#contribution` channel.
## Setup your development environment ## 1) Setup your development environment
### Container based development flow (recommended and the easiest)
All you need is to intall [Docker Engine 20.11+](https://docs.docker.com/engine/install/) on your local machine and run `pnpm dev:container`. It will build the base image for Coolify and start the development server inside Docker. All required ports (3000, 3001) will be exposed to your host.
### Github codespaces - 🌟 [Container based](docs/dev_setup/Container.md) ← *Recomended*
- 📦 [DockerContainer](docs/dev_setup/DockerContiner.md) *WIP
- 🐙 [Github Codespaces](docs/dev_setup/GithubCodespaces.md)
- ☁️ [GitPod](docs/dev_setup/GitPod.md)
- 🍏 [Local Mac](docs/dev_setup/Mac.md)
If you have github codespaces enabled then you can just create a codespace and run `pnpm dev` to run your the dev environment. All the required dependencies and packages has been configured for you already. ## 2) Basic requirements
### Gitpod - [Install Pnpm](https://pnpm.io/installation)
1. Use [container based development flow](#container-based-development-flow-easiest)
2. Or setup your workspace manually:
Create a workspace from this repository, run `pnpm install && pnpm db:push && pnpm db:seed` and then `pnpm dev`. All the required dependencies and packages has been configured for you already. ## 3) Setup Coolify
> Some packages, just `pack` are not installed in this way. You cannot test all the features. Please use the [container based development flow](#container-based-development-flow-easiest). - Copy `apps/api/.env.example` to `apps/api/.env`
- Edit `apps/api/.env`, set the `COOLIFY_APP_ID` environment variable to something cool.
- Run `pnpm install` to install dependencies.
- Run `pnpm db:push` to o create a local SQlite database. This will apply all migrations at `db/dev.db`.
- Run `pnpm db:seed` seed the database.
- Run `pnpm dev` start coding.
### Local Machine ```sh
> At the moment, Coolify `doesn't support Windows`. You must use `Linux` or `MacOS` or consider using Gitpod or Github Codespaces. # Or... Copy and paste commands bellow:
cp apps/api/.env.example apps/api.env
pnpm install
pnpm db:push
pnpm db:seed
pnpm dev
```
Install all the prerequisites manually to your host system. If you would not like to install anything, I suggest to use the [container based development flow](#container-based-development-flow-easiest). ## 4) Start Coding
- Due to the lock file, this repository is best with [pnpm](https://pnpm.io). I recommend you try and use `pnpm` because it is cool and efficient! You should be able to access `http://localhost:3000`.
- You need to have [Docker Engine](https://docs.docker.com/engine/install/) installed locally.
- You need to have [Docker Compose Plugin](https://docs.docker.com/compose/install/compose-plugin/) installed locally.
- You need to have [GIT LFS Support](https://git-lfs.github.com/) installed locally.
Optional: 1. Click `Register` and setup your first user.
- To test Heroku buildpacks, you need [pack](https://github.com/buildpacks/pack) binary installed locally.
### Inside a Docker container
`WIP`
## Setup Coolify
- Copy `apps/api/.env.template` to `apps/api/.env.template` and set the `COOLIFY_APP_ID` environment variable to something cool.
- `pnpm install` to install dependencies.
- `pnpm db:push` to o create a local SQlite database.
This will apply all migrations at `db/dev.db`.
- `pnpm db:seed` seed the database.
- `pnpm dev` start coding.
## Technical skills required
- **Languages**: Node.js / Javascript / Typescript
- **Framework JS/TS**: [SvelteKit](https://kit.svelte.dev/) & [Fastify](https://www.fastify.io/)
- **Database ORM**: [Prisma.io](https://www.prisma.io/)
- **Docker Engine API**
## How to add a new service?
You can find all details [here](https://github.com/coollabsio/coolify-community-templates)

View File

@ -0,0 +1,21 @@
## Getting Started
To contribute to `Coolify` development, you'll benefit from knowing the following:
- **Languages**
- [Node.js]() - 📚 [Introduction](https://nodejs.dev/en/learn/introduction-to-nodejs/)
- Javascript - 📚 [Learn Javascript](https://learnjavascript.online/)
- Typescript - 📚 [Learn@FreecodeCamp](https://www.freecodecamp.org/news/learn-typescript-beginners-guide/)
- **Framework JS/TS**
- [SvelteKit](https://kit.svelte.dev/) - 📚 [Tutorial](https://svelte.dev/tutorial/basics)
- [Fastify](https://www.fastify.io/)
- **Database ORM**
- [Prisma.io](https://www.prisma.io/) - 📚 [Quickstart](https://www.prisma.io/docs/getting-started/quickstart)
- **Docker**
- [Docker Engine API](https://docs.docker.com/engine/api/)
## How to add a new service?
You can find all details [here](https://github.com/coollabsio/coolify-community-templates)

View File

@ -0,0 +1,10 @@
### Container based development flow (recommended and the easiest)
All you need is to
1. Install [Docker Engine 20.11+](https://docs.docker.com/engine/install/) on your local machine
2. Run `pnpm dev:container`.
It will build the base image for Coolify and start the development server inside Docker.
All required ports (3000, 3001) will be exposed to your host.

View File

@ -0,0 +1,2 @@
### Inside a Docker container
# `WIP`

19
docs/dev_setup/GitPod.md Normal file
View File

@ -0,0 +1,19 @@
### Gitpod
#### Option 1 - Prefered:
Follow the same steps as [container based development flow](./Container.md)
#### Option 2 - Manual setup:
1. Create a workspace from this repository,
1. run `pnpm install && pnpm db:push && pnpm db:seed`
1. and then `pnpm dev`.
All the required dependencies and packages has been configured for you already.
---
> Some packages, just `pack` are not installed in this way.
You cannot test all the features.
Please use the [container based development flow](./Container.md).

View File

@ -0,0 +1,8 @@
### Github codespaces
If you have github codespaces enabled then you can just:
1. create a codespace and
2. run `pnpm dev` to run your the dev environment.
All the required dependencies and packages has been configured for you already.

View File

@ -0,0 +1,17 @@
### Local Machine
At the moment, Coolify `doesn't support Windows`.
You must use `Linux` or `MacOS` or consider using Gitpod or Github Codespaces.
Install all the prerequisites manually to your host system.
If you would not like to install anything,
I suggest to use the [container based development flow](#container-based-development-flow-easiest).
- Due to the lock file, this repository is best with [pnpm](https://pnpm.io). I recommend you try and use `pnpm` because it is cool and efficient!
- You need to have [Docker Engine](https://docs.docker.com/engine/install/) installed locally.
- You need to have [Docker Compose Plugin](https://docs.docker.com/compose/install/compose-plugin/) installed locally.
- You need to have [GIT LFS Support](https://git-lfs.github.com/) installed locally.
Optional:
- To test Heroku buildpacks, you need [pack](https://github.com/buildpacks/pack) binary installed locally.

2
docs/dev_setup/Mac.md Normal file
View File

@ -0,0 +1,2 @@
### Mac Setup

View File

@ -0,0 +1 @@
### Mac Setup