add contribution guide
This commit is contained in:
		
							
								
								
									
										28
									
								
								CONTRIBUTION.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								CONTRIBUTION.md
									
									
									
									
									
										Normal 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.
 | 
			
		||||
@@ -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"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user