From 4336acc16e4ac4d3e7d96cfe84501b1b246ef0e8 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:59:29 +0200 Subject: [PATCH 01/30] fix database migration bug in dev env --- .env.development.example | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.env.development.example b/.env.development.example index 920c32d92..8818f7d70 100644 --- a/.env.development.example +++ b/.env.development.example @@ -1,4 +1,5 @@ -APP_NAME=Coolify-localhost +# Coolify Configuration +APP_NAME=coolify-localhost APP_ID=development APP_ENV=local APP_KEY= @@ -7,10 +8,18 @@ APP_URL=http://localhost APP_PORT=8000 MUX_ENABLED=false +# Selenium Driver URL for Dusk DUSK_DRIVER_URL=http://selenium:4444 -## For Andras only -# To purge cache +# PostgreSQL Database Configuration +DB_DATABASE=coolify-db +DB_USERNAME=coolify +DB_PASSWORD=password +DB_HOST=localhost +DB_PORT=5432 + +# Special Keys for Andras +# For cache purging BUNNY_API_KEY= -# To upload assets +# For asset uploads BUNNY_STORAGE_API_KEY= From ddf0ff8f251f6eb4ee971acca26c13fadb46fdef Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:59:42 +0200 Subject: [PATCH 02/30] cleanup instalation --- .env.production | 11 ++++++++++- docker-compose.prod.yml | 18 ++++++++++-------- docker-compose.windows.yml | 8 ++++---- docker-compose.yml | 3 ++- scripts/install.sh | 22 +++++++++++++++------- 5 files changed, 41 insertions(+), 21 deletions(-) diff --git a/.env.production b/.env.production index f15a8b0e9..1d0fd0fe1 100644 --- a/.env.production +++ b/.env.production @@ -1,10 +1,19 @@ +# Coolify Configuration APP_ID= -APP_NAME=Coolify APP_KEY= +# PostgreSQL Database Configuration +DB_DATABASE=coolify-db +DB_USERNAME= DB_PASSWORD= + +# Redis Configuration REDIS_PASSWORD= +# Pusher Configuration PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= + +# Additional Configuration +SELF_HOSTED=true \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index b8156cab5..91e30f0ce 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -13,13 +13,12 @@ services: - /data/coolify/backups:/var/www/html/storage/app/backups - /data/coolify/webhooks-during-maintenance:/var/www/html/storage/app/webhooks-during-maintenance environment: - - PHP_MEMORY_LIMIT - - APP_ID - APP_ENV=production - - APP_DEBUG - - APP_NAME + - APP_NAME=Coolify + - APP_ID - APP_KEY - APP_URL + - APP_DEBUG - DB_CONNECTION - DB_HOST - DB_PORT @@ -34,6 +33,7 @@ services: - HORIZON_BALANCE_MAX_SHIFT - HORIZON_BALANCE_COOLDOWN - SSL_MODE=off + - PHP_MEMORY_LIMIT - PHP_PM_CONTROL=dynamic - PHP_PM_START_SERVERS=1 - PHP_PM_MIN_SPARE_SERVERS=1 @@ -83,20 +83,22 @@ services: condition: service_healthy redis: condition: service_healthy + soketi: + condition: service_healthy postgres: volumes: - coolify-db:/var/lib/postgresql/data environment: - POSTGRES_USER: "${DB_USERNAME:-coolify}" + POSTGRES_USER: "${DB_USERNAME}" POSTGRES_PASSWORD: "${DB_PASSWORD}" - POSTGRES_DB: "${DB_DATABASE:-coolify}" + POSTGRES_DB: "${DB_DATABASE:-coolify-db}" healthcheck: test: [ "CMD-SHELL", - "pg_isready -U ${DB_USERNAME:-coolify}", + "pg_isready -U ${DB_USERNAME}", "-d", - "${DB_DATABASE:-coolify}" + "${DB_DATABASE:-coolify-db}" ] interval: 5s retries: 10 diff --git a/docker-compose.windows.yml b/docker-compose.windows.yml index af5ecc0f7..1f2c13b5c 100644 --- a/docker-compose.windows.yml +++ b/docker-compose.windows.yml @@ -71,16 +71,16 @@ services: volumes: - coolify-db:/var/lib/postgresql/data environment: - POSTGRES_USER: "${DB_USERNAME:-coolify}" + POSTGRES_USER: "${DB_USERNAME}" POSTGRES_PASSWORD: "${DB_PASSWORD}" - POSTGRES_DB: "${DB_DATABASE:-coolify}" + POSTGRES_DB: "${DB_DATABASE:-coolify-db}" healthcheck: test: [ "CMD-SHELL", - "pg_isready -U ${DB_USERNAME:-coolify}", + "pg_isready -U ${DB_USERNAME}", "-d", - "${DB_DATABASE:-coolify}" + "${DB_DATABASE:-coolify-db}" ] interval: 5s retries: 10 diff --git a/docker-compose.yml b/docker-compose.yml index 8eed44f8c..930c0a6b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: depends_on: - postgres - redis + - soketi postgres: image: postgres:15-alpine container_name: coolify-db @@ -32,4 +33,4 @@ networks: coolify: name: coolify driver: bridge - external: true + external: false diff --git a/scripts/install.sh b/scripts/install.sh index 2aaaebaef..45c6b93bd 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -287,13 +287,21 @@ curl -fsSL $CDN/upgrade.sh -o /data/coolify/source/upgrade.sh # Copy .env.example if .env does not exist if [ ! -f /data/coolify/source/.env ]; then cp /data/coolify/source/.env.production /data/coolify/source/.env - sed -i "s|APP_ID=.*|APP_ID=$(openssl rand -hex 16)|g" /data/coolify/source/.env - sed -i "s|APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|g" /data/coolify/source/.env - sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env - sed -i "s|REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env - sed -i "s|PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|g" /data/coolify/source/.env - sed -i "s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g" /data/coolify/source/.env - sed -i "s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env + # Generate a secure APP_ID and APP_KEY + sed -i "s|^APP_ID=.*|APP_ID=$(openssl rand -hex 16)|" "$ENV_FILE" + sed -i "s|^APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|" "$ENV_FILE" + + # Generate a secure Postgres DB username and password + sed -i "s|^DB_USERNAME=.*|DB_USERNAME=$(openssl rand -hex 16)|" "$ENV_FILE" + sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|" "$ENV_FILE" + + # Generate a secure Redis password + sed -i "s|^REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|" "$ENV_FILE" + + # Generate secure Pusher credentials + sed -i "s|^PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|" "$ENV_FILE" + sed -i "s|^PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|" "$ENV_FILE" + sed -i "s|^PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|" "$ENV_FILE" fi # Merge .env and .env.production. New values will be added to .env From 1564e3c3710ae71b5043f00138981471fa4a839f Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:06:24 +0200 Subject: [PATCH 03/30] formating --- .env.development.example | 4 ++-- docker-compose.prod.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.development.example b/.env.development.example index 8818f7d70..23ae268a8 100644 --- a/.env.development.example +++ b/.env.development.example @@ -1,11 +1,11 @@ # Coolify Configuration +APP_ENV=local APP_NAME=coolify-localhost APP_ID=development -APP_ENV=local APP_KEY= -APP_DEBUG=true APP_URL=http://localhost APP_PORT=8000 +APP_DEBUG=true MUX_ENABLED=false # Selenium Driver URL for Dusk diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 91e30f0ce..6b7275b47 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -19,12 +19,12 @@ services: - APP_KEY - APP_URL - APP_DEBUG - - DB_CONNECTION - - DB_HOST - - DB_PORT - DB_DATABASE - DB_USERNAME - DB_PASSWORD + - DB_HOST + - DB_PORT + - DB_CONNECTION - QUEUE_CONNECTION - REDIS_HOST - REDIS_PASSWORD @@ -47,7 +47,7 @@ services: - PUSHER_APP_KEY - PUSHER_APP_SECRET - AUTOUPDATE - - SELF_HOSTED + - SELF_HOSTED=true - SSH_MUX_PERSIST_TIME - FEEDBACK_DISCORD_WEBHOOK - WAITLIST From 78998110d7f561825d01adff4da94f61498bab8f Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:17:54 +0200 Subject: [PATCH 04/30] coolify-db and remove some env --- .env.development.example | 2 +- .env.production | 3 --- docker-compose.dev.yml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.env.development.example b/.env.development.example index 23ae268a8..07766ef9f 100644 --- a/.env.development.example +++ b/.env.development.example @@ -1,6 +1,6 @@ # Coolify Configuration APP_ENV=local -APP_NAME=coolify-localhost +APP_NAME=Coolify-localhost APP_ID=development APP_KEY= APP_URL=http://localhost diff --git a/.env.production b/.env.production index 1d0fd0fe1..d1b4b88fe 100644 --- a/.env.production +++ b/.env.production @@ -14,6 +14,3 @@ REDIS_PASSWORD= PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= - -# Additional Configuration -SELF_HOSTED=true \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 7eda14d41..f48ada98e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -28,7 +28,7 @@ services: environment: POSTGRES_USER: "${DB_USERNAME:-coolify}" POSTGRES_PASSWORD: "${DB_PASSWORD:-password}" - POSTGRES_DB: "${DB_DATABASE:-coolify}" + POSTGRES_DB: "${DB_DATABASE:-coolify-db}" POSTGRES_HOST_AUTH_METHOD: "trust" volumes: - /data/coolify/_volumes/database/:/var/lib/postgresql/data From cf09290b514e03d7cc12f7d1b4831b93e13a906e Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:42:53 +0200 Subject: [PATCH 05/30] fix db host --- .env.development.example | 1 - 1 file changed, 1 deletion(-) diff --git a/.env.development.example b/.env.development.example index 07766ef9f..51d51f035 100644 --- a/.env.development.example +++ b/.env.development.example @@ -15,7 +15,6 @@ DUSK_DRIVER_URL=http://selenium:4444 DB_DATABASE=coolify-db DB_USERNAME=coolify DB_PASSWORD=password -DB_HOST=localhost DB_PORT=5432 # Special Keys for Andras From bacd2531b551bc2e310255241f0ddf2ee76994e6 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:02:53 +0200 Subject: [PATCH 06/30] Final fix to make DB Migrations work --- .env.development.example | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.development.example b/.env.development.example index 51d51f035..56eef9c04 100644 --- a/.env.development.example +++ b/.env.development.example @@ -12,9 +12,11 @@ MUX_ENABLED=false DUSK_DRIVER_URL=http://selenium:4444 # PostgreSQL Database Configuration -DB_DATABASE=coolify-db +DB_DATABASE=coolify DB_USERNAME=coolify DB_PASSWORD=password +# Set DB_HOST to the Postgres container IP or, if using Orbstack, use the container name (e.g., postgres.coolify.orb.local). This is needed for DB Migrations to work. +DB_HOST= DB_PORT=5432 # Special Keys for Andras From bfd79c5270563b1af3ac90fe0d5bd47e0dcd5d8b Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:11:23 +0200 Subject: [PATCH 07/30] updated contributing docs --- CONTRIBUTION.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index 02a21573c..42ba47ffd 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -11,24 +11,29 @@ You can ask for guidance anytime on our ### 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/). +- If you are using a Mac, I highly recommend installing [Orbsatck](https://orbstack.dev/download) as a much faster alternative and complete replacement to Docker Desktop. +- For better DX, install [Spin](https://serversideup.net/open-source/spin/docs). ### 2) Set your environment variables - Copy [.env.development.example](./.env.development.example) to .env. +- Make sure to set the DB_HOST environment variable to the Postgres container IP or, if using Orbstack, use the container name (e.g., postgres.coolify.orb.local) to make sure that the DB Migrations work. ## 3) Start & setup Coolify - Run `spin up` - You can notice that errors will be thrown. Don't worry. - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. -### 4) Start development +## 4) Install php to make sure you can do DB migrations (optional) + +### 5) 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. Mails are caught by Mailpit: `localhost:8025` + ## New Service Contribution Check out the docs [here](https://coolify.io/docs/knowledge-base/add-a-service). From 6ca49eb1ac07a40cd7173d4b98b50819dd0f9873 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:23:07 +0200 Subject: [PATCH 08/30] fix database name to coolify instead of coolify-db --- .env.production | 2 +- docker-compose.dev.yml | 2 +- docker-compose.prod.yml | 4 ++-- docker-compose.windows.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.production b/.env.production index d1b4b88fe..8e5dd4602 100644 --- a/.env.production +++ b/.env.production @@ -3,7 +3,7 @@ APP_ID= APP_KEY= # PostgreSQL Database Configuration -DB_DATABASE=coolify-db +DB_DATABASE=coolify DB_USERNAME= DB_PASSWORD= diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index f48ada98e..7eda14d41 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -28,7 +28,7 @@ services: environment: POSTGRES_USER: "${DB_USERNAME:-coolify}" POSTGRES_PASSWORD: "${DB_PASSWORD:-password}" - POSTGRES_DB: "${DB_DATABASE:-coolify-db}" + POSTGRES_DB: "${DB_DATABASE:-coolify}" POSTGRES_HOST_AUTH_METHOD: "trust" volumes: - /data/coolify/_volumes/database/:/var/lib/postgresql/data diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 6b7275b47..aaceeed17 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -91,14 +91,14 @@ services: environment: POSTGRES_USER: "${DB_USERNAME}" POSTGRES_PASSWORD: "${DB_PASSWORD}" - POSTGRES_DB: "${DB_DATABASE:-coolify-db}" + POSTGRES_DB: "${DB_DATABASE:-coolify}" healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", - "${DB_DATABASE:-coolify-db}" + "${DB_DATABASE:-coolify}" ] interval: 5s retries: 10 diff --git a/docker-compose.windows.yml b/docker-compose.windows.yml index 1f2c13b5c..a1ee1aeea 100644 --- a/docker-compose.windows.yml +++ b/docker-compose.windows.yml @@ -73,14 +73,14 @@ services: environment: POSTGRES_USER: "${DB_USERNAME}" POSTGRES_PASSWORD: "${DB_PASSWORD}" - POSTGRES_DB: "${DB_DATABASE:-coolify-db}" + POSTGRES_DB: "${DB_DATABASE:-coolify}" healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", - "${DB_DATABASE:-coolify-db}" + "${DB_DATABASE:-coolify}" ] interval: 5s retries: 10 From 0286d639fb8596b6717a7d8bfdf07ebc113f968f Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:11:06 +0200 Subject: [PATCH 09/30] set custom ray port --- .env.development.example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.env.development.example b/.env.development.example index 56eef9c04..c65c07c83 100644 --- a/.env.development.example +++ b/.env.development.example @@ -19,6 +19,9 @@ DB_PASSWORD=password DB_HOST= DB_PORT=5432 +#Set custom ray port +RAY_PORT= + # Special Keys for Andras # For cache purging BUNNY_API_KEY= From adf7a4422acfcba7910b0b29e870a1638f190507 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:18:50 +0200 Subject: [PATCH 10/30] added another clarification for mac users --- CONTRIBUTION.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index 42ba47ffd..bdbce5054 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -22,7 +22,9 @@ You can ask for guidance anytime on our ## 3) Start & setup Coolify - Run `spin up` - You can notice that errors will be thrown. Don't worry. - - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. + - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. + +- If you are using Orbstack, you need to set the IP Address/Domain of the coolify server in the server settings to: testing-host.coolify.orb.local ## 4) Install php to make sure you can do DB migrations (optional) @@ -36,4 +38,3 @@ Mails are caught by Mailpit: `localhost:8025` ## New Service Contribution Check out the docs [here](https://coolify.io/docs/knowledge-base/add-a-service). - From c9fc8fa6874be8888d924f1e4b4d9c1e9106438e Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:20:18 +0200 Subject: [PATCH 11/30] added code blocks around domains --- CONTRIBUTION.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index bdbce5054..d171adc42 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -17,14 +17,14 @@ You can ask for guidance anytime on our ### 2) Set your environment variables - Copy [.env.development.example](./.env.development.example) to .env. -- Make sure to set the DB_HOST environment variable to the Postgres container IP or, if using Orbstack, use the container name (e.g., postgres.coolify.orb.local) to make sure that the DB Migrations work. +- Make sure to set the DB_HOST environment variable to the Postgres container IP or, if using Orbstack, use the container name (e.g., `postgres.coolify.orb.local`) to make sure that the DB Migrations work. ## 3) Start & setup Coolify - Run `spin up` - You can notice that errors will be thrown. Don't worry. - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. -- If you are using Orbstack, you need to set the IP Address/Domain of the coolify server in the server settings to: testing-host.coolify.orb.local +- If you are using Orbstack, you need to set the IP Address/Domain of the coolify server in the server settings to: `testing-host.coolify.orb.local` ## 4) Install php to make sure you can do DB migrations (optional) From 1b6c0aef93007722affa601ca6a2af4d7f189548 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:20:53 +0200 Subject: [PATCH 12/30] formatting --- CONTRIBUTION.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index d171adc42..e0d0f7874 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -24,7 +24,8 @@ You can ask for guidance anytime on our - Run `spin up` - You can notice that errors will be thrown. Don't worry. - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. -- If you are using Orbstack, you need to set the IP Address/Domain of the coolify server in the server settings to: `testing-host.coolify.orb.local` +- If you are using Orbstack, you need to set the IP Address/Domain of the coolify server in the server settings to: +`testing-host.coolify.orb.local` ## 4) Install php to make sure you can do DB migrations (optional) From bf6404ab24faa51d8c2037608494d5d6221a4549 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Fri, 16 Aug 2024 23:03:23 +0200 Subject: [PATCH 13/30] remove 3 lines, as this is not needed anymore --- CONTRIBUTION.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index e0d0f7874..7bde228ae 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -24,9 +24,6 @@ You can ask for guidance anytime on our - Run `spin up` - You can notice that errors will be thrown. Don't worry. - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. -- If you are using Orbstack, you need to set the IP Address/Domain of the coolify server in the server settings to: -`testing-host.coolify.orb.local` - ## 4) Install php to make sure you can do DB migrations (optional) ### 5) Start development From 79a120cd85e5ea420a7ad9a4cb19730450355bd4 Mon Sep 17 00:00:00 2001 From: Andrin <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 22 Aug 2024 17:25:13 +0200 Subject: [PATCH 14/30] Update CONTRIBUTION.md --- CONTRIBUTION.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index 7bde228ae..52ab580d5 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -24,9 +24,7 @@ You can ask for guidance anytime on our - Run `spin up` - You can notice that errors will be thrown. Don't worry. - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. -## 4) Install php to make sure you can do DB migrations (optional) - -### 5) Start development +## 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. From 73e14e37ac91b5621a4f17fbfc279861ae294f08 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:35:51 +0200 Subject: [PATCH 15/30] new Contributing guide --- CONTRIBUTING.md | 122 ++++++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTION.md | 36 -------------- 2 files changed, 122 insertions(+), 36 deletions(-) create mode 100644 CONTRIBUTING.md delete mode 100644 CONTRIBUTION.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..51a930b5d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,122 @@ +# 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 `#contribute` channel. + +## Code Contribution + +### 1) Setup your development environment + +Follow the steps below for your operating system: + +#### Windows + +1. Install Docker Desktop (or similar): + - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) + - Follow the installation instructions provided on the Docker website + +2. Install Spin: + - Follow the instructions to install Spin on Windows from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows) + +#### MacOS + +1. Install Orbstack or Docker Desktop (or similar): + - Orbstack (faster, lighter, better alternative to Docker Desktop) + - Download and install [Orbstack](https://docs.orbstack.dev/quick-start#installation) + - Docker Desktop: + - Download and install [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/) + +2. Install Spin: + - Follow the instructions to install Spin on MacOS from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-macos) + +#### Linux + +1. Install Docker Engine or Docker Desktop (or similar): + - Docker Engine (recommended): + - Follow the official [Docker Engine installation guide](https://docs.docker.com/engine/install/) for your Linux distribution + - Docker Desktop: + - If you want a GUI, you can use Docker Desktop [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/) + +2. Install Spin: + Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux) + +### 2) Verify Installation + +After installing Docker (or Orbstack) and Spin, verify the installation: + +1. Open a terminal or command prompt +2. Run the following commands: + ```bash + docker --version + spin --version + ``` + You should see version information for both Docker and Spin. + +### 3) Fork/Clone the Coolify Repository and Setup your Development Environment + +1. Fork/clone the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. + +2. Install a code editor on your machine (choose one): + + - Visual Studio Code: + - Windows/macOS/Linux: Download and install from [https://code.visualstudio.com/](https://code.visualstudio.com/) + + - Cursor (recommended): + - Windows/macOS/Linux: Download and install from [https://cursor.sh/](https://cursor.sh/) + + - Zed (very fast code editor): + - macOS/Linux: Download and install from [https://zed.dev/](https://zed.dev/) + - Windows: Not available yet + +3. Clone the Coolify Repository to your local machine + - Use `git clone` in the commandline + - Use GitHub Desktop (recommended): + - Download and install from [https://desktop.github.com/download/](https://desktop.github.com/download/) + +4. Open the cloned Coolify Repository in your choosen code editor. + +### 4) Set up Environment Variables + +1. Copy the `.env.development.example` file to your `.env` file. + +2. Set the database connection: + - For macOS users with Orbstack, update the `DB_HOST` variable to `postgres.coolify.orb.local`: + ``` + DB_HOST=postgres.coolify.orb.local + ``` + - For other systems, you may need to use the appropriate IP address or hostname of your PostgreSQL database. + +3. Review and adjust other environment variables as needed for your development setup. + +### 5) Start & Setup Coolify + +1. Open a terminal in the Coolify directory. + +2. Run the following command: + ``` + spin up + ``` + Note: You may see some errors, but don't worry; this is expected. + +3. If you encounter permission errors, especially on MacOS, use: + ``` + sudo spin up + ``` + +### 6) Start Development + +1. Access your Coolify instance: + - URL: `http://localhost:8000` + - Login: `test@example.com` + - Password: `password` + +2. Additional development tools: + - Laravel Horizon (scheduler): `http://localhost:8000/horizon` + Note: Only accessible when logged in as root user + - Mailpit (email catcher): `http://localhost:8025` + +### 7) Contributing a New Service + +To add a new service to Coolify, please refer to our documentation: +[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md deleted file mode 100644 index 52ab580d5..000000000 --- a/CONTRIBUTION.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -## Code Contribution - -### 1) Setup your development environment - -- You need to have Docker Engine (or equivalent) [installed](https://docs.docker.com/engine/install/) on your system. -- If you are using a Mac, I highly recommend installing [Orbsatck](https://orbstack.dev/download) as a much faster alternative and complete replacement to Docker Desktop. -- For better DX, install [Spin](https://serversideup.net/open-source/spin/docs). - -### 2) Set your environment variables - -- Copy [.env.development.example](./.env.development.example) to .env. -- Make sure to set the DB_HOST environment variable to the Postgres container IP or, if using Orbstack, use the container name (e.g., `postgres.coolify.orb.local`) to make sure that the DB Migrations work. - -## 3) Start & setup Coolify - -- Run `spin up` - You can notice that errors will be thrown. Don't worry. - - If you see weird permission errors, especially on Mac, run `sudo spin up` instead. - -## 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. - -Mails are caught by Mailpit: `localhost:8025` - - -## New Service Contribution -Check out the docs [here](https://coolify.io/docs/knowledge-base/add-a-service). From 9776e14e938c9e5c84951bf05af34a6304030176 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:55:03 +0200 Subject: [PATCH 16/30] add telescope --- CONTRIBUTING.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 51a930b5d..65110a5c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,7 +82,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: 2. Set the database connection: - For macOS users with Orbstack, update the `DB_HOST` variable to `postgres.coolify.orb.local`: - ``` + ```env DB_HOST=postgres.coolify.orb.local ``` - For other systems, you may need to use the appropriate IP address or hostname of your PostgreSQL database. @@ -115,6 +115,11 @@ After installing Docker (or Orbstack) and Spin, verify the installation: - Laravel Horizon (scheduler): `http://localhost:8000/horizon` Note: Only accessible when logged in as root user - Mailpit (email catcher): `http://localhost:8025` + - Telescope (debugging tool): `http://localhost:8000/telescope` + Note: Disabled by default, enable by adding the following envrionment variable to your `.env` file: + ```env + TELESCOPE_ENABLED=true + ``` ### 7) Contributing a New Service From ca3268ce561cc2cc0b8921de6dcae95f8297dc62 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:57:28 +0200 Subject: [PATCH 17/30] add separators --- CONTRIBUTING.md | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 65110a5c0..172b4bd05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,14 @@ # Contributing -> "First, thanks for considering to contribute to my project. It really means a lot!" - [@andrasbacsai](https://github.com/andrasbacsai) +> "First, thanks for considering contributing 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 `#contribute` channel. +--- + ## Code Contribution -### 1) Setup your development environment +### 1. Setup your development environment Follow the steps below for your operating system: @@ -36,12 +38,14 @@ Follow the steps below for your operating system: - Docker Engine (recommended): - Follow the official [Docker Engine installation guide](https://docs.docker.com/engine/install/) for your Linux distribution - Docker Desktop: - - If you want a GUI, you can use Docker Desktop [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/) + - If you want a GUI, you can use [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/) 2. Install Spin: Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux) -### 2) Verify Installation +--- + +### 2. Verify Installation After installing Docker (or Orbstack) and Spin, verify the installation: @@ -53,7 +57,9 @@ After installing Docker (or Orbstack) and Spin, verify the installation: ``` You should see version information for both Docker and Spin. -### 3) Fork/Clone the Coolify Repository and Setup your Development Environment +--- + +### 3. Fork/Clone the Coolify Repository and Setup your Development Environment 1. Fork/clone the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. @@ -70,13 +76,15 @@ After installing Docker (or Orbstack) and Spin, verify the installation: - Windows: Not available yet 3. Clone the Coolify Repository to your local machine - - Use `git clone` in the commandline + - Use `git clone` in the command line - Use GitHub Desktop (recommended): - - Download and install from [https://desktop.github.com/download/](https://desktop.github.com/download/) + - Download and install from [https://desktop.github.com/](https://desktop.github.com/) -4. Open the cloned Coolify Repository in your choosen code editor. +4. Open the cloned Coolify Repository in your chosen code editor. -### 4) Set up Environment Variables +--- + +### 4. Set up Environment Variables 1. Copy the `.env.development.example` file to your `.env` file. @@ -89,7 +97,9 @@ After installing Docker (or Orbstack) and Spin, verify the installation: 3. Review and adjust other environment variables as needed for your development setup. -### 5) Start & Setup Coolify +--- + +### 5. Start & Setup Coolify 1. Open a terminal in the Coolify directory. @@ -99,12 +109,14 @@ After installing Docker (or Orbstack) and Spin, verify the installation: ``` Note: You may see some errors, but don't worry; this is expected. -3. If you encounter permission errors, especially on MacOS, use: +3. If you encounter permission errors, especially on macOS, use: ``` sudo spin up ``` -### 6) Start Development +--- + +### 6. Start Development 1. Access your Coolify instance: - URL: `http://localhost:8000` @@ -116,12 +128,14 @@ After installing Docker (or Orbstack) and Spin, verify the installation: Note: Only accessible when logged in as root user - Mailpit (email catcher): `http://localhost:8025` - Telescope (debugging tool): `http://localhost:8000/telescope` - Note: Disabled by default, enable by adding the following envrionment variable to your `.env` file: + Note: Disabled by default, enable by adding the following environment variable to your `.env` file: ```env TELESCOPE_ENABLED=true ``` -### 7) Contributing a New Service +--- + +### 7. Contributing a New Service To add a new service to Coolify, please refer to our documentation: -[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) +[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) \ No newline at end of file From cda66dadefea03c91a87067e0b776c8b3a5d1a59 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:02:41 +0200 Subject: [PATCH 18/30] line --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 172b4bd05..4839d30b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ You can ask for guidance anytime on our [Discord server](https://coollabs.io/discord) in the `#contribute` channel. ---- + --- ## Code Contribution @@ -138,4 +138,4 @@ After installing Docker (or Orbstack) and Spin, verify the installation: ### 7. Contributing a New Service To add a new service to Coolify, please refer to our documentation: -[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) \ No newline at end of file +[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) From cd73a9a94ebe5bfd39d08d974e1022f0dffa0915 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:07:17 +0200 Subject: [PATCH 19/30] add lines to make it more redeable --- CONTRIBUTING.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4839d30b3..d4892922f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,11 +4,12 @@ You can ask for guidance anytime on our [Discord server](https://coollabs.io/discord) in the `#contribute` channel. - --- +--- ## Code Contribution ### 1. Setup your development environment +--- Follow the steps below for your operating system: @@ -46,6 +47,7 @@ Follow the steps below for your operating system: --- ### 2. Verify Installation +--- After installing Docker (or Orbstack) and Spin, verify the installation: @@ -60,6 +62,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 3. Fork/Clone the Coolify Repository and Setup your Development Environment +--- 1. Fork/clone the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. @@ -85,6 +88,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 4. Set up Environment Variables +--- 1. Copy the `.env.development.example` file to your `.env` file. @@ -100,6 +104,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 5. Start & Setup Coolify +--- 1. Open a terminal in the Coolify directory. @@ -117,6 +122,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 6. Start Development +--- 1. Access your Coolify instance: - URL: `http://localhost:8000` @@ -136,6 +142,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 7. Contributing a New Service +--- To add a new service to Coolify, please refer to our documentation: -[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) +[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) \ No newline at end of file From 8d24e93a1664b371375446af2caf2395e155fb57 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:10:10 +0200 Subject: [PATCH 20/30] remove duplicated lines --- CONTRIBUTING.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d4892922f..301f2b124 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,12 +4,10 @@ You can ask for guidance anytime on our [Discord server](https://coollabs.io/discord) in the `#contribute` channel. ---- ## Code Contribution ### 1. Setup your development environment ---- Follow the steps below for your operating system: @@ -47,7 +45,6 @@ Follow the steps below for your operating system: --- ### 2. Verify Installation ---- After installing Docker (or Orbstack) and Spin, verify the installation: @@ -62,7 +59,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 3. Fork/Clone the Coolify Repository and Setup your Development Environment ---- 1. Fork/clone the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. @@ -88,7 +84,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 4. Set up Environment Variables ---- 1. Copy the `.env.development.example` file to your `.env` file. @@ -104,7 +99,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 5. Start & Setup Coolify ---- 1. Open a terminal in the Coolify directory. @@ -122,7 +116,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 6. Start Development ---- 1. Access your Coolify instance: - URL: `http://localhost:8000` @@ -142,7 +135,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- ### 7. Contributing a New Service ---- To add a new service to Coolify, please refer to our documentation: -[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) \ No newline at end of file +[Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) From 3c413ff5c953fea0e9b31a6753febffa58cbe425 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:44:30 +0200 Subject: [PATCH 21/30] change heading levels --- CONTRIBUTING.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 301f2b124..b8233e2d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,11 +7,11 @@ You can ask for guidance anytime on our [Discord server](https://coollabs.io/dis ## Code Contribution -### 1. Setup your development environment +## 1. Setup your development environment Follow the steps below for your operating system: -#### Windows +### Windows 1. Install Docker Desktop (or similar): - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) @@ -20,7 +20,7 @@ Follow the steps below for your operating system: 2. Install Spin: - Follow the instructions to install Spin on Windows from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows) -#### MacOS +### MacOS 1. Install Orbstack or Docker Desktop (or similar): - Orbstack (faster, lighter, better alternative to Docker Desktop) @@ -31,7 +31,7 @@ Follow the steps below for your operating system: 2. Install Spin: - Follow the instructions to install Spin on MacOS from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-macos) -#### Linux +### Linux 1. Install Docker Engine or Docker Desktop (or similar): - Docker Engine (recommended): @@ -44,7 +44,7 @@ Follow the steps below for your operating system: --- -### 2. Verify Installation +## 2. Verify Installation After installing Docker (or Orbstack) and Spin, verify the installation: @@ -58,20 +58,20 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- -### 3. Fork/Clone the Coolify Repository and Setup your Development Environment +## 3. Fork/Clone the Coolify Repository and Setup your Development Environment 1. Fork/clone the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. 2. Install a code editor on your machine (choose one): - Visual Studio Code: - - Windows/macOS/Linux: Download and install from [https://code.visualstudio.com/](https://code.visualstudio.com/) + - Windows/macOS/Linux: Download and install from [https://code.visualstudio.com/download](https://code.visualstudio.com/download) - Cursor (recommended): - Windows/macOS/Linux: Download and install from [https://cursor.sh/](https://cursor.sh/) - Zed (very fast code editor): - - macOS/Linux: Download and install from [https://zed.dev/](https://zed.dev/) + - macOS/Linux: Download and install from [https://zed.dev/download](https://zed.dev/download) - Windows: Not available yet 3. Clone the Coolify Repository to your local machine @@ -83,7 +83,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- -### 4. Set up Environment Variables +## 4. Set up Environment Variables 1. Copy the `.env.development.example` file to your `.env` file. @@ -98,7 +98,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- -### 5. Start & Setup Coolify +## 5. Start & Setup Coolify 1. Open a terminal in the Coolify directory. @@ -115,7 +115,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- -### 6. Start Development +## 6. Start Development 1. Access your Coolify instance: - URL: `http://localhost:8000` @@ -134,7 +134,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: --- -### 7. Contributing a New Service +## 7. Contributing a New Service To add a new service to Coolify, please refer to our documentation: [Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) From 19881aa83a5df5f4a89ef1fac32dcdc8f987bd28 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:46:15 +0200 Subject: [PATCH 22/30] remove lines --- CONTRIBUTING.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8233e2d3..a54120ec6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,6 +7,7 @@ You can ask for guidance anytime on our [Discord server](https://coollabs.io/dis ## Code Contribution + ## 1. Setup your development environment Follow the steps below for your operating system: @@ -42,7 +43,6 @@ Follow the steps below for your operating system: 2. Install Spin: Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux) ---- ## 2. Verify Installation @@ -56,7 +56,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: ``` You should see version information for both Docker and Spin. ---- ## 3. Fork/Clone the Coolify Repository and Setup your Development Environment @@ -81,7 +80,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: 4. Open the cloned Coolify Repository in your chosen code editor. ---- ## 4. Set up Environment Variables @@ -96,7 +94,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: 3. Review and adjust other environment variables as needed for your development setup. ---- ## 5. Start & Setup Coolify @@ -113,7 +110,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: sudo spin up ``` ---- ## 6. Start Development @@ -132,7 +128,6 @@ After installing Docker (or Orbstack) and Spin, verify the installation: TELESCOPE_ENABLED=true ``` ---- ## 7. Contributing a New Service From c9663c410898485462b2f8b7b15675204b5bc908 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:38:20 +0200 Subject: [PATCH 23/30] finalize and cleanup contributing.md --- CONTRIBUTING.md | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a54120ec6..f42db35b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,12 +2,11 @@ > "First, thanks for considering contributing 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 `#contribute` channel. +You can ask for guidance anytime on our [Discord server](https://coollabs.io/discord) in the `[#contribute](https://discord.com/channels/459365938081431553/1276111417413468244)` channel. ## Code Contribution - ## 1. Setup your development environment Follow the steps below for your operating system: @@ -16,35 +15,34 @@ Follow the steps below for your operating system: 1. Install Docker Desktop (or similar): - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) - - Follow the installation instructions provided on the Docker website 2. Install Spin: - Follow the instructions to install Spin on Windows from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows) ### MacOS -1. Install Orbstack or Docker Desktop (or similar): +1. Install Orbstack (recommended), Docker Desktop (or similar): - Orbstack (faster, lighter, better alternative to Docker Desktop) - Download and install [Orbstack](https://docs.orbstack.dev/quick-start#installation) - Docker Desktop: - Download and install [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/) 2. Install Spin: - - Follow the instructions to install Spin on MacOS from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-macos) + - Follow the instructions to install Spin on MacOS from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-macos/#download-and-install-spin) ### Linux -1. Install Docker Engine or Docker Desktop (or similar): - - Docker Engine (recommended): +1. Install Docker Engine (recommended), Docker Desktop (or similar): + - Docker Engine (use this, as there is no VM overhead): - Follow the official [Docker Engine installation guide](https://docs.docker.com/engine/install/) for your Linux distribution - Docker Desktop: - If you want a GUI, you can use [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/) 2. Install Spin: - Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux) + - Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux#configure-docker-permissions) -## 2. Verify Installation +## 2. Verify installation After installing Docker (or Orbstack) and Spin, verify the installation: @@ -57,17 +55,17 @@ After installing Docker (or Orbstack) and Spin, verify the installation: You should see version information for both Docker and Spin. -## 3. Fork/Clone the Coolify Repository and Setup your Development Environment +## 3. Fork/Clone the Coolify repository and setup your local repository 1. Fork/clone the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. -2. Install a code editor on your machine (choose one): +2. Install a code editor on your machine (below are some popular choices, choose one): - - Visual Studio Code: + - Visual Studio Code (recommended): - Windows/macOS/Linux: Download and install from [https://code.visualstudio.com/download](https://code.visualstudio.com/download) - - Cursor (recommended): - - Windows/macOS/Linux: Download and install from [https://cursor.sh/](https://cursor.sh/) + - Cursor (recommended but not free if you really want to use it): + - Windows/macOS/Linux: Download and install from [https://www.cursor.com/](https://www.cursor.com/) - Zed (very fast code editor): - macOS/Linux: Download and install from [https://zed.dev/download](https://zed.dev/download) @@ -83,19 +81,18 @@ After installing Docker (or Orbstack) and Spin, verify the installation: ## 4. Set up Environment Variables -1. Copy the `.env.development.example` file to your `.env` file. +1. Locate the `.env.development.example` file in the root directory of your local Coolify repository. -2. Set the database connection: - - For macOS users with Orbstack, update the `DB_HOST` variable to `postgres.coolify.orb.local`: - ```env - DB_HOST=postgres.coolify.orb.local - ``` - - For other systems, you may need to use the appropriate IP address or hostname of your PostgreSQL database. +2. Duplicate the `.env.development.example` file and rename the copy to `.env`. -3. Review and adjust other environment variables as needed for your development setup. +3. Open the new `.env` file and review its contents. Adjust any environment variables as needed for your development setup. + +4. If you encounter errors during database migrations, update the database connection settings in your `.env` file. Use the IP address or hostname of your PostgreSQL database container. You can find this information by running `docker ps` after executing `spin up`. + +5. Save the changes to your `.env` file. -## 5. Start & Setup Coolify +## 5. Start Coolify 1. Open a terminal in the Coolify directory. @@ -123,7 +120,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: Note: Only accessible when logged in as root user - Mailpit (email catcher): `http://localhost:8025` - Telescope (debugging tool): `http://localhost:8000/telescope` - Note: Disabled by default, enable by adding the following environment variable to your `.env` file: + Note: Disabled by default (so the database is not overloaded), enable by adding the following environment variable to your `.env` file: ```env TELESCOPE_ENABLED=true ``` From 0425a47f690f3a4e5527a0d2fa8c9a5be247a9e4 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:39:40 +0200 Subject: [PATCH 24/30] fix discord chanel --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f42db35b8..812897142 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ > "First, thanks for considering contributing 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 `[#contribute](https://discord.com/channels/459365938081431553/1276111417413468244)` channel. +You can ask for guidance anytime on our [Discord server](https://coollabs.io/discord) in the `#contribute` channel. ## Code Contribution From b4e41a2a9e908a6bc73db8ead9e9e33c59d6cb8f Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:59:58 +0200 Subject: [PATCH 25/30] improve windows install --- CONTRIBUTING.md | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 812897142..04240286d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,16 +13,20 @@ Follow the steps below for your operating system: ### Windows -1. Install Docker Desktop (or similar): - - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) +1. Install `docker-ce`, Docker Desktop (or similar): + - Docker CE (recommended): + - Follow the instructions to install WSL2, Ubuntu and on that install `docker-ce` from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows#install-windows-subsystem-linux-v2-wsl2) + - Install Docker Desktop (easier): + - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) + - Ensure WSL2 backend is enabled in Docker Desktop settings 2. Install Spin: - - Follow the instructions to install Spin on Windows from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows) + - Follow the instructions to install Spin on Windows from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows#download-and-install-spin-into-wsl2) ### MacOS -1. Install Orbstack (recommended), Docker Desktop (or similar): - - Orbstack (faster, lighter, better alternative to Docker Desktop) +1. Install Orbstack, Docker Desktop (or similar): + - Orbstack (recommended, as it is a faster and lighter alternative to Docker Desktop): - Download and install [Orbstack](https://docs.orbstack.dev/quick-start#installation) - Docker Desktop: - Download and install [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/) @@ -32,8 +36,8 @@ Follow the steps below for your operating system: ### Linux -1. Install Docker Engine (recommended), Docker Desktop (or similar): - - Docker Engine (use this, as there is no VM overhead): +1. Install Docker Engine, Docker Desktop (or similar): + - Docker Engine (recommended, as there is no VM overhead): - Follow the official [Docker Engine installation guide](https://docs.docker.com/engine/install/) for your Linux distribution - Docker Desktop: - If you want a GUI, you can use [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/) @@ -42,7 +46,7 @@ Follow the steps below for your operating system: - Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux#configure-docker-permissions) -## 2. Verify installation +## 2. Verify installation (optional) After installing Docker (or Orbstack) and Spin, verify the installation: @@ -55,33 +59,35 @@ After installing Docker (or Orbstack) and Spin, verify the installation: You should see version information for both Docker and Spin. -## 3. Fork/Clone the Coolify repository and setup your local repository +## 3. Fork the Coolify repository and setup your local repository -1. Fork/clone the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. +1. Fork the [Coolify](https://github.com/coollabsio/coolify) repository to your GitHub account. 2. Install a code editor on your machine (below are some popular choices, choose one): - - Visual Studio Code (recommended): + - Visual Studio Code (recommended free): - Windows/macOS/Linux: Download and install from [https://code.visualstudio.com/download](https://code.visualstudio.com/download) - - Cursor (recommended but not free if you really want to use it): + - Cursor (recommended but paid for getting the full benefits): - Windows/macOS/Linux: Download and install from [https://www.cursor.com/](https://www.cursor.com/) - Zed (very fast code editor): - macOS/Linux: Download and install from [https://zed.dev/download](https://zed.dev/download) - Windows: Not available yet -3. Clone the Coolify Repository to your local machine +3. Clone the Coolify Repository from your fork to your local machine - Use `git clone` in the command line - Use GitHub Desktop (recommended): - Download and install from [https://desktop.github.com/](https://desktop.github.com/) + - Open GitHub Desktop and login with your GitHub account + - Click on `File` -> `Clone Repository` select `github.com` as the repository location, then select your forked Coolify repository, choose the local path and then click `Clone` 4. Open the cloned Coolify Repository in your chosen code editor. ## 4. Set up Environment Variables -1. Locate the `.env.development.example` file in the root directory of your local Coolify repository. +1. In the Code Editor, locate the `.env.development.example` file in the root directory of your local Coolify repository. 2. Duplicate the `.env.development.example` file and rename the copy to `.env`. From 2398afc74fba3d2214608bdd68a2c05fbffe13fa Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:08:21 +0200 Subject: [PATCH 26/30] improve spin up more --- CONTRIBUTING.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 04240286d..ffbcc9112 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,9 +100,9 @@ After installing Docker (or Orbstack) and Spin, verify the installation: ## 5. Start Coolify -1. Open a terminal in the Coolify directory. +1. Open a terminal in the local Coolify directory. -2. Run the following command: +2. Run the following command in the terminal (leave that terminal open): ``` spin up ``` @@ -113,6 +113,8 @@ After installing Docker (or Orbstack) and Spin, verify the installation: sudo spin up ``` +Note: If you change environment variables afterwards or anything seems broken, press Ctrl + C to stop the process and run `spin up` again. + ## 6. Start Development From d7c685af1f64d21ebcee8b5618d9ed91ee38091b Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:31:19 +0200 Subject: [PATCH 27/30] updated dev env --- .env.development.example | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.env.development.example b/.env.development.example index c65c07c83..f9bcd361a 100644 --- a/.env.development.example +++ b/.env.development.example @@ -1,6 +1,6 @@ # Coolify Configuration APP_ENV=local -APP_NAME=Coolify-localhost +APP_NAME="Coolify Development" APP_ID=development APP_KEY= APP_URL=http://localhost @@ -8,6 +8,9 @@ APP_PORT=8000 APP_DEBUG=true MUX_ENABLED=false +# Enable Laravel Telescope for debugging +TELESCOPE_ENABLED=false + # Selenium Driver URL for Dusk DUSK_DRIVER_URL=http://selenium:4444 @@ -15,8 +18,7 @@ DUSK_DRIVER_URL=http://selenium:4444 DB_DATABASE=coolify DB_USERNAME=coolify DB_PASSWORD=password -# Set DB_HOST to the Postgres container IP or, if using Orbstack, use the container name (e.g., postgres.coolify.orb.local). This is needed for DB Migrations to work. -DB_HOST= +DB_HOST=host.docker.internal DB_PORT=5432 #Set custom ray port From ed2e5f59f9347fbba1c89710130e399bf32d43a1 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:36:26 +0200 Subject: [PATCH 28/30] added DB migration note to contributing file --- CONTRIBUTING.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ffbcc9112..4dc5aeda9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -134,7 +134,26 @@ Note: If you change environment variables afterwards or anything seems broken, p ``` -## 7. Contributing a New Service +## 7. Development Notes + +When working on Coolify, keep the following in mind: + +1. **Database Migrations**: After switching branches or making changes to the database structure, always run migrations: + ```bash + docker exec -it coolify php artisan migrate + ``` + +2. **Resetting Development Setup**: To reset your development setup to a clean database with default values: + ```bash + docker exec -it coolify php artisan migrate:fresh --seed + ``` + +3. **Troubleshooting**: If you encounter unexpected behavior, ensure your database is up-to-date with the latest migrations and if possible reset the development setup to eliminate any envrionement specific issues. + +Remember, forgetting to migrate the database can cause problems, so make it a habit to run migrations after pulling changes or switching branches. + + +## 8. Contributing a New Service To add a new service to Coolify, please refer to our documentation: [Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) From 8d9314347ffc4b4422f62b9058141777ad468330 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:57:45 +0200 Subject: [PATCH 29/30] updated WSL and windows links --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4dc5aeda9..8a55b3c3c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,9 @@ Follow the steps below for your operating system: 1. Install `docker-ce`, Docker Desktop (or similar): - Docker CE (recommended): - - Follow the instructions to install WSL2, Ubuntu and on that install `docker-ce` from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows#install-windows-subsystem-linux-v2-wsl2) + - Install Windows Subsystem for Linux v2 (WSL2) by following this guide: [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install) + - After installing WSL2, install Docker CE for your Linux distribution by following this guide: [Install Docker Engine](https://docs.docker.com/engine/install/) + - Make sure to choose the appropriate Linux distribution (e.g., Ubuntu) when following the Docker installation guide - Install Docker Desktop (easier): - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) - Ensure WSL2 backend is enabled in Docker Desktop settings From 162cdf6f28a249a1080b4771702ae54bba3dcfe8 Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Thu, 29 Aug 2024 13:12:34 +0200 Subject: [PATCH 30/30] PR section --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8a55b3c3c..9618bfae5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -159,3 +159,31 @@ Remember, forgetting to migrate the database can cause problems, so make it a ha To add a new service to Coolify, please refer to our documentation: [Adding a New Service](https://coolify.io/docs/knowledge-base/add-a-service) + + +## 9. Create a Pull Request + +1. After making changes or adding a new service: + - Commit your changes to your forked repository. + - Push the changes to your GitHub account. + +2. Creating the Pull Request (PR): + - Navigate to the main Coolify repository on GitHub. + - Click the "Pull requests" tab. + - Click the green "New pull request" button. + - Choose your fork and branch as the compare branch. + - Click "Create pull request". + +3. Filling out the PR details: + - Give your PR a descriptive title. + - In the description, explain the changes you've made. + - Reference any related issues by using keywords like "Fixes #123" or "Closes #456". + +4. Important note: + Always set the base branch for your PR to the `next` branch of the Coolify repository, not the `main` branch. + +5. Submit your PR: + - Review your changes one last time. + - Click "Create pull request" to submit. + +After submission, maintainers will review your PR and may request changes or provide feedback.