From 3d0354cf7e96a649687c2cc3be67d75fbfeba1e2 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 2 Oct 2023 14:58:29 +0200 Subject: [PATCH] add contribution guide --- CONTRIBUTION.md | 28 ++++++++++++++++++++++++++++ scripts/run | 5 +++++ 2 files changed, 33 insertions(+) create mode 100644 CONTRIBUTION.md diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md new file mode 100644 index 000000000..ef67baba1 --- /dev/null +++ b/CONTRIBUTION.md @@ -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. diff --git a/scripts/run b/scripts/run index 9c3a04eca..85eed74d4 100755 --- a/scripts/run +++ b/scripts/run @@ -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"