add contribution guide

This commit is contained in:
Andras Bacsai 2023-10-02 14:58:29 +02:00
parent af5b9fced1
commit 3d0354cf7e
2 changed files with 33 additions and 0 deletions

28
CONTRIBUTION.md Normal file
View File

@ -0,0 +1,28 @@
# Contributing
> "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](https://coollabs.io/discord) in the `#contribution` channel.
## 1) Setup your development environment
- You need to have Docker Engine (or equivalent) [installed](https://docs.docker.com/engine/install/) on your system.
- For better DX, install [Spin](https://serversideup.net/open-source/spin/).
## 2) Set your environment variables
- Copy [.env.development.example](./.env.development.example) to .env.
- If necessary, set `USERID` & `GROUPID` accordingly (read in .env file).
## 3) Start & setup Coolify
- Run `spin up` - You can notice that errors will be thrown. Don't worry.
- Run `./scripts/run setup:dev` - This will generate a secret key for you, delete any existing database layouts, migrate database to the new layout, and seed your database.
## 4) Start development
You can login your Coolify instance at `localhost:8000` with `test@example.com` and `password`.
Your horizon (Laravel scheduler): `localhost:8000/horizon` - Only reachable if you logged in with root user.

View File

@ -20,6 +20,11 @@ function help {
compgen -A function | cat -n
}
function setup:dev {
docker exec coolify bash -c "composer install"
docker exec coolify bash -c "php artisan key:generate"
docker exec coolify bash -c "php artisan migrate:fresh --seed"
}
function sync:v3 {
if [ -z "$1" ]; then
echo -e "Please provide a version.\n\nExample: run sync:v3 3.12.32"