mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-18 12:33:06 +00:00
Compare commits
24 Commits
v4.0.0-bet
...
php83
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c04815da4 | ||
|
|
b053cfeee2 | ||
|
|
930157b5db | ||
|
|
786b6f11b2 | ||
|
|
0b33315991 | ||
|
|
b6b9179bb3 | ||
|
|
9122983f22 | ||
|
|
ccdcea665d | ||
|
|
7b5aa78557 | ||
|
|
e38b29d833 | ||
|
|
d4679a8be1 | ||
|
|
7ac45aa706 | ||
|
|
8862b50c98 | ||
|
|
b5a56892fd | ||
|
|
664a990c60 | ||
|
|
16e472da19 | ||
|
|
7dd0588bfe | ||
|
|
a95ebb4d56 | ||
|
|
75f266fa9f | ||
|
|
90fd0ebf12 | ||
|
|
4aeb8ff02b | ||
|
|
410b55cf03 | ||
|
|
0881d001d6 | ||
|
|
483b4f8eb7 |
@@ -6,7 +6,7 @@ APP_KEY=
|
||||
APP_URL=http://localhost
|
||||
APP_PORT=8000
|
||||
APP_DEBUG=true
|
||||
MUX_ENABLED=false
|
||||
SSH_MUX_ENABLED=false
|
||||
|
||||
# PostgreSQL Database Configuration
|
||||
DB_DATABASE=coolify
|
||||
|
||||
3
.github/workflows/pr-build.yml
vendored
3
.github/workflows/pr-build.yml
vendored
@@ -21,6 +21,7 @@ jobs:
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
actions: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Login to ghcr.io
|
||||
@@ -44,6 +45,7 @@ jobs:
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
actions: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Login to ghcr.io
|
||||
@@ -67,6 +69,7 @@ jobs:
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
actions: write
|
||||
needs: [amd64, aarch64]
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
124
CONTRIBUTING.md
124
CONTRIBUTING.md
@@ -1,17 +1,27 @@
|
||||
# Contributing
|
||||
# Contributing to Coolify
|
||||
|
||||
> "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.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
## Code Contribution
|
||||
1. [Setup Development Environment](#1-setup-development-environment)
|
||||
2. [Verify Installation](#2-verify-installation-optional)
|
||||
3. [Fork and Setup Local Repository](#3-fork-and-setup-local-repository)
|
||||
4. [Set up Environment Variables](#4-set-up-environment-variables)
|
||||
5. [Start Coolify](#5-start-coolify)
|
||||
6. [Start Development](#6-start-development)
|
||||
7. [Development Notes](#7-development-notes)
|
||||
8. [Create a Pull Request](#8-create-a-pull-request)
|
||||
9. [Additional Contribution Guidelines](#additional-contribution-guidelines)
|
||||
|
||||
## 1. Setup your development environment
|
||||
## 1. Setup Development Environment
|
||||
|
||||
Follow the steps below for your operating system:
|
||||
|
||||
### Windows
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
1. Install `docker-ce`, Docker Desktop (or similar):
|
||||
- Docker CE (recommended):
|
||||
@@ -25,7 +35,10 @@ 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#download-and-install-spin-into-wsl2)
|
||||
|
||||
### MacOS
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>MacOS</strong></summary>
|
||||
|
||||
1. Install Orbstack, Docker Desktop (or similar):
|
||||
- Orbstack (recommended, as it is a faster and lighter alternative to Docker Desktop):
|
||||
@@ -36,7 +49,10 @@ 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/#download-and-install-spin)
|
||||
|
||||
### Linux
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux</strong></summary>
|
||||
|
||||
1. Install Docker Engine, Docker Desktop (or similar):
|
||||
- Docker Engine (recommended, as there is no VM overhead):
|
||||
@@ -47,8 +63,9 @@ 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#configure-docker-permissions)
|
||||
|
||||
</details>
|
||||
|
||||
## 2. Verify installation (optional)
|
||||
## 2. Verify Installation (Optional)
|
||||
|
||||
After installing Docker (or Orbstack) and Spin, verify the installation:
|
||||
|
||||
@@ -60,25 +77,20 @@ After installing Docker (or Orbstack) and Spin, verify the installation:
|
||||
```
|
||||
You should see version information for both Docker and Spin.
|
||||
|
||||
|
||||
## 3. Fork the Coolify repository and setup your local repository
|
||||
## 3. Fork and Setup Local Repository
|
||||
|
||||
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):
|
||||
2. Install a code editor on your machine (choose one):
|
||||
|
||||
- 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 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
|
||||
| Editor | Platform | Download Link |
|
||||
|--------|----------|---------------|
|
||||
| Visual Studio Code (recommended free) | Windows/macOS/Linux | [Download](https://code.visualstudio.com/download) |
|
||||
| Cursor (recommended but paid) | Windows/macOS/Linux | [Download](https://www.cursor.com/) |
|
||||
| Zed (very fast) | macOS/Linux | [Download](https://zed.dev/download) |
|
||||
|
||||
3. Clone the Coolify Repository from your fork to your local machine
|
||||
- Use `git clone` in the command line
|
||||
- Use `git clone` in the command line, or
|
||||
- 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
|
||||
@@ -86,37 +98,32 @@ 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
|
||||
|
||||
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`.
|
||||
|
||||
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 Coolify
|
||||
|
||||
1. Open a terminal in the local Coolify directory.
|
||||
|
||||
2. Run the following command in the terminal (leave that terminal open):
|
||||
```
|
||||
```bash
|
||||
spin up
|
||||
```
|
||||
Note: You may see some errors, but don't worry; this is expected.
|
||||
|
||||
> [!NOTE]
|
||||
> You may see some errors, but don't worry; this is expected.
|
||||
|
||||
3. If you encounter permission errors, especially on macOS, use:
|
||||
```
|
||||
```bash
|
||||
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.
|
||||
|
||||
> [!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
|
||||
|
||||
@@ -126,15 +133,17 @@ Note: If you change environment variables afterwards or anything seems broken, p
|
||||
- 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`
|
||||
- Telescope (debugging tool): `http://localhost:8000/telescope`
|
||||
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
|
||||
```
|
||||
| Tool | URL | Note |
|
||||
|------|-----|------|
|
||||
| Laravel Horizon (scheduler) | `http://localhost:8000/horizon` | Only accessible when logged in as root user |
|
||||
| Mailpit (email catcher) | `http://localhost:8025` | |
|
||||
| Telescope (debugging tool) | `http://localhost:8000/telescope` | Disabled by default |
|
||||
|
||||
> [!NOTE]
|
||||
> To enable Telescope, add the following to your `.env` file:
|
||||
> ```env
|
||||
> TELESCOPE_ENABLED=true
|
||||
> ```
|
||||
|
||||
## 7. Development Notes
|
||||
|
||||
@@ -150,18 +159,12 @@ When working on Coolify, keep the following in mind:
|
||||
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.
|
||||
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 environment-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.
|
||||
> [!IMPORTANT]
|
||||
> 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)
|
||||
|
||||
|
||||
## 9. Create a Pull Request
|
||||
## 8. Create a Pull Request
|
||||
|
||||
1. After making changes or adding a new service:
|
||||
- Commit your changes to your forked repository.
|
||||
@@ -179,11 +182,26 @@ To add a new service to Coolify, please refer to our documentation:
|
||||
- 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.
|
||||
> [!IMPORTANT]
|
||||
> Always set the base branch for your PR to the `next` branch of the Coolify repository, not the `main` branch.
|
||||
|
||||
5. Submit your PR:
|
||||
4. Submit your PR:
|
||||
- Review your changes one last time.
|
||||
- Click "Create pull request" to submit.
|
||||
|
||||
> [!NOTE]
|
||||
> Make sure your PR is out of draft mode as soon as it's ready for review. PRs that are in draft mode for a long time may be closed by maintainers.
|
||||
|
||||
After submission, maintainers will review your PR and may request changes or provide feedback.
|
||||
|
||||
## Additional Contribution Guidelines
|
||||
|
||||
### 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/contribute/service)
|
||||
|
||||
### Contributing to Documentation
|
||||
|
||||
To contribute to the Coolify documentation, please refer to this guide:
|
||||
[Contributing to the Coolify Documentation](https://github.com/coollabsio/documentation-coolify/blob/main/CONTRIBUTING.md)
|
||||
|
||||
@@ -282,7 +282,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
|
||||
public function validateServer()
|
||||
{
|
||||
try {
|
||||
config()->set('coolify.mux_enabled', false);
|
||||
config()->set('constants.ssh.mux_enabled', false);
|
||||
|
||||
// EC2 does not have `uptime` command, lol
|
||||
instant_remote_process(['ls /'], $this->createdServer, true);
|
||||
|
||||
@@ -24,7 +24,11 @@ class Form extends Component
|
||||
|
||||
public $timezones;
|
||||
|
||||
protected $listeners = ['serverInstalled', 'revalidate' => '$refresh'];
|
||||
protected $listeners = [
|
||||
'serverInstalled',
|
||||
'refreshServerShow' => 'serverInstalled',
|
||||
'revalidate' => '$refresh',
|
||||
];
|
||||
|
||||
protected $rules = [
|
||||
'server.name' => 'required',
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Livewire\Server\New;
|
||||
|
||||
use App\Enums\ProxyStatus;
|
||||
use App\Enums\ProxyTypes;
|
||||
use App\Models\Server;
|
||||
use App\Models\Team;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Component;
|
||||
|
||||
class ByIp extends Component
|
||||
@@ -40,7 +40,7 @@ class ByIp extends Component
|
||||
|
||||
public bool $is_build_server = false;
|
||||
|
||||
public $swarm_managers = [];
|
||||
public Collection $swarm_managers;
|
||||
|
||||
protected $rules = [
|
||||
'name' => 'required|string',
|
||||
@@ -102,11 +102,6 @@ class ByIp extends Component
|
||||
'port' => $this->port,
|
||||
'team_id' => currentTeam()->id,
|
||||
'private_key_id' => $this->private_key_id,
|
||||
'proxy' => [
|
||||
// set default proxy type to traefik v2
|
||||
'type' => ProxyTypes::TRAEFIK->value,
|
||||
'status' => ProxyStatus::EXITED->value,
|
||||
],
|
||||
];
|
||||
if ($this->is_swarm_worker) {
|
||||
$payload['swarm_cluster'] = $this->selected_swarm_cluster;
|
||||
@@ -115,6 +110,9 @@ class ByIp extends Component
|
||||
data_forget($payload, 'proxy');
|
||||
}
|
||||
$server = Server::create($payload);
|
||||
$server->proxy->set('status', 'exited');
|
||||
$server->proxy->set('type', ProxyTypes::TRAEFIK->value);
|
||||
$server->save();
|
||||
if ($this->is_build_server) {
|
||||
$this->is_swarm_manager = false;
|
||||
$this->is_swarm_worker = false;
|
||||
|
||||
@@ -14,7 +14,7 @@ class Show extends Component
|
||||
|
||||
public $parameters = [];
|
||||
|
||||
protected $listeners = ['refreshServerShow' => '$refresh'];
|
||||
protected $listeners = ['refreshServerShow'];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
@@ -29,6 +29,12 @@ class Show extends Component
|
||||
}
|
||||
}
|
||||
|
||||
public function refreshServerShow()
|
||||
{
|
||||
$this->server->refresh();
|
||||
$this->dispatch('$refresh');
|
||||
}
|
||||
|
||||
public function submit()
|
||||
{
|
||||
$this->dispatch('serverRefresh', false);
|
||||
|
||||
@@ -967,7 +967,7 @@ $schema://$host {
|
||||
|
||||
public function validateConnection()
|
||||
{
|
||||
config()->set('coolify.mux_enabled', false);
|
||||
config()->set('constants.ssh.mux_enabled', false);
|
||||
|
||||
$server = Server::find($this->id);
|
||||
if (! $server) {
|
||||
|
||||
@@ -98,12 +98,10 @@ function generateScpCommand(Server $server, string $source, string $dest)
|
||||
$muxPersistTime = config('constants.ssh.mux_persist_time');
|
||||
|
||||
$scp_command = "timeout $timeout scp ";
|
||||
// Check if multiplexing is enabled
|
||||
$muxEnabled = config('constants.ssh.mux_enabled', true);
|
||||
$muxEnabled = config('constants.ssh.mux_enabled', true) && config('coolify.is_windows_docker_desktop') == false;
|
||||
// ray('SSH Multiplexing Enabled:', $muxEnabled)->blue();
|
||||
|
||||
if ($muxEnabled) {
|
||||
// Always use multiplexing when enabled
|
||||
$muxSocket = "/var/www/html/storage/app/ssh/mux/{$server->muxFilename()}";
|
||||
$scp_command .= "-o ControlMaster=auto -o ControlPath=$muxSocket -o ControlPersist={$muxPersistTime} ";
|
||||
ensureMultiplexedConnection($server);
|
||||
@@ -163,10 +161,8 @@ function generateSshCommand(Server $server, string $command)
|
||||
|
||||
$ssh_command = "timeout $timeout ssh ";
|
||||
|
||||
// Check if multiplexing is enabled
|
||||
$muxEnabled = config('constants.ssh.mux_enabled', true);
|
||||
$muxEnabled = config('constants.ssh.mux_enabled') && config('coolify.is_windows_docker_desktop') == false;
|
||||
// ray('SSH Multiplexing Enabled:', $muxEnabled)->blue();
|
||||
|
||||
if ($muxEnabled) {
|
||||
// Always use multiplexing when enabled
|
||||
$muxSocket = "/var/www/html/storage/app/ssh/mux/{$server->muxFilename()}";
|
||||
@@ -201,6 +197,10 @@ function generateSshCommand(Server $server, string $command)
|
||||
|
||||
function ensureMultiplexedConnection(Server $server)
|
||||
{
|
||||
if (! (config('constants.ssh.mux_enabled') && config('coolify.is_windows_docker_desktop') == false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
static $ensuredConnections = [];
|
||||
|
||||
if (isset($ensuredConnections[$server->id])) {
|
||||
@@ -212,7 +212,11 @@ function ensureMultiplexedConnection(Server $server)
|
||||
}
|
||||
|
||||
$muxSocket = "/var/www/html/storage/app/ssh/mux/{$server->muxFilename()}";
|
||||
$checkCommand = "ssh -O check -o ControlPath=$muxSocket {$server->user}@{$server->ip} 2>/dev/null";
|
||||
$checkCommand = "ssh -O check -o ControlPath=$muxSocket ";
|
||||
if (data_get($server, 'settings.is_cloudflare_tunnel')) {
|
||||
$checkCommand .= '-o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" ';
|
||||
}
|
||||
$checkCommand .= " {$server->user}@{$server->ip}";
|
||||
|
||||
$process = Process::run($checkCommand);
|
||||
|
||||
@@ -233,8 +237,12 @@ function ensureMultiplexedConnection(Server $server)
|
||||
$serverInterval = config('constants.ssh.server_interval');
|
||||
$muxPersistTime = config('constants.ssh.mux_persist_time');
|
||||
|
||||
$establishCommand = "ssh -fNM -o ControlMaster=auto -o ControlPath=$muxSocket -o ControlPersist={$muxPersistTime} "
|
||||
."-i {$privateKeyLocation} "
|
||||
$establishCommand = "ssh -fNM -o ControlMaster=auto -o ControlPath=$muxSocket -o ControlPersist={$muxPersistTime} ";
|
||||
|
||||
if (data_get($server, 'settings.is_cloudflare_tunnel')) {
|
||||
$establishCommand .= '-o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" ';
|
||||
}
|
||||
$establishCommand .= "-i {$privateKeyLocation} "
|
||||
.'-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '
|
||||
.'-o PasswordAuthentication=no '
|
||||
."-o ConnectTimeout=$connectionTimeout "
|
||||
@@ -260,6 +268,10 @@ function ensureMultiplexedConnection(Server $server)
|
||||
|
||||
function shouldResetMultiplexedConnection(Server $server)
|
||||
{
|
||||
if (! (config('constants.ssh.mux_enabled') && config('coolify.is_windows_docker_desktop') == false)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static $ensuredConnections = [];
|
||||
|
||||
if (! isset($ensuredConnections[$server->id])) {
|
||||
@@ -275,6 +287,10 @@ function shouldResetMultiplexedConnection(Server $server)
|
||||
|
||||
function resetMultiplexedConnection(Server $server)
|
||||
{
|
||||
if (! (config('constants.ssh.mux_enabled') && config('coolify.is_windows_docker_desktop') == false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
static $ensuredConnections = [];
|
||||
|
||||
if (isset($ensuredConnections[$server->id])) {
|
||||
|
||||
@@ -6,7 +6,8 @@ return [
|
||||
'contact' => 'https://coolify.io/docs/contact',
|
||||
],
|
||||
'ssh' => [
|
||||
'mux_enabled' => env('SSH_MUX_ENABLED', true),
|
||||
// Using MUX
|
||||
'mux_enabled' => env('MUX_ENABLED', env('SSH_MUX_ENABLED', true), true),
|
||||
'mux_persist_time' => env('SSH_MUX_PERSIST_TIME', '1h'),
|
||||
'connection_timeout' => 10,
|
||||
'server_interval' => 20,
|
||||
|
||||
@@ -7,7 +7,6 @@ return [
|
||||
'self_hosted' => env('SELF_HOSTED', true),
|
||||
'waitlist' => env('WAITLIST', false),
|
||||
'license_url' => 'https://licenses.coollabs.io',
|
||||
'mux_enabled' => env('MUX_ENABLED', true),
|
||||
'dev_webhook' => env('SERVEO_URL'),
|
||||
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),
|
||||
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
||||
|
||||
@@ -7,7 +7,7 @@ return [
|
||||
|
||||
// The release version of your application
|
||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||
'release' => '4.0.0-beta.334',
|
||||
'release' => '4.0.0-beta.336',
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => config('app.env'),
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.334';
|
||||
return '4.0.0-beta.336';
|
||||
|
||||
@@ -3,11 +3,15 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/dev/Dockerfile
|
||||
args:
|
||||
USER_ID: "${USERID:-9999}"
|
||||
GROUP_ID: "${GROUPID:-9999}"
|
||||
ports:
|
||||
- "${APP_PORT:-8000}:80"
|
||||
- "8000:8080"
|
||||
environment:
|
||||
PUID: "${USERID:-1000}"
|
||||
PGID: "${GROUPID:-1000}"
|
||||
PHP_OPCACHE_ENABLE: 1
|
||||
USER_ID: "${USERID:-9999}"
|
||||
GROUP_ID: "${GROUPID:-9999}"
|
||||
SSL_MODE: "off"
|
||||
AUTORUN_LARAVEL_STORAGE_LINK: "false"
|
||||
AUTORUN_LARAVEL_MIGRATION: "false"
|
||||
|
||||
@@ -48,6 +48,7 @@ services:
|
||||
- PUSHER_APP_SECRET
|
||||
- AUTOUPDATE
|
||||
- SELF_HOSTED
|
||||
- SSH_MUX_ENABLED
|
||||
- SSH_MUX_PERSIST_TIME
|
||||
- FEEDBACK_DISCORD_WEBHOOK
|
||||
- WAITLIST
|
||||
@@ -86,7 +87,7 @@ services:
|
||||
soketi:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
volumes:
|
||||
volumes:
|
||||
- coolify-db:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: "${DB_USERNAME}"
|
||||
|
||||
@@ -45,7 +45,7 @@ services:
|
||||
- PUSHER_APP_SECRET
|
||||
- AUTOUPDATE=true
|
||||
- SELF_HOSTED=true
|
||||
- MUX_ENABLED=false
|
||||
- SSH_MUX_ENABLED=false
|
||||
- IS_WINDOWS_DOCKER_DESKTOP=true
|
||||
ports:
|
||||
- "${APP_PORT:-8000}:80"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
FROM serversideup/php:8.2-fpm-nginx-v2.2.1
|
||||
FROM serversideup/php:8.3-fpm-nginx
|
||||
|
||||
USER root
|
||||
ARG TARGETPLATFORM
|
||||
ARG USER_ID
|
||||
ARG GROUP_ID
|
||||
# https://github.com/cloudflare/cloudflared/releases
|
||||
ARG CLOUDFLARED_VERSION=2024.4.1
|
||||
|
||||
@@ -16,7 +19,7 @@ RUN apt-get update
|
||||
RUN apt-get install postgresql-client-$POSTGRES_VERSION -y
|
||||
|
||||
# Coolify requirements
|
||||
RUN apt-get install -y php8.2-pgsql openssh-client git git-lfs jq lsof
|
||||
RUN apt-get install -y openssh-client git git-lfs jq lsof
|
||||
RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
COPY --chmod=755 docker/dev/etc/s6-overlay/ /etc/s6-overlay/
|
||||
|
||||
@@ -40,7 +43,12 @@ RUN /bin/bash -c "if [[ ${TARGETPLATFORM} == 'linux/arm64' ]]; then \
|
||||
COPY --from=minio/mc:RELEASE.2024-09-09T07-53-10Z /usr/bin/mc /usr/bin/mc
|
||||
RUN chmod +x /usr/bin/mc
|
||||
|
||||
RUN { \
|
||||
echo 'upload_max_filesize=256M'; \
|
||||
echo 'post_max_size=256M'; \
|
||||
} > /etc/php/current_version/cli/conf.d/upload-limits.ini
|
||||
# RUN { \
|
||||
# echo 'upload_max_filesize=256M'; \
|
||||
# echo 'post_max_size=256M'; \
|
||||
# } > /etc/php/current_version/cli/conf.d/upload-limits.ini
|
||||
|
||||
RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID
|
||||
RUN docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID --service nginx
|
||||
USER www-data
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/command/execlineb -P
|
||||
foreground {
|
||||
s6-sleep 5
|
||||
su - webuser -c "php /var/www/html/artisan start:horizon"
|
||||
php /var/www/html/artisan start:horizon
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/command/execlineb -P
|
||||
foreground {
|
||||
s6-sleep 5
|
||||
su - webuser -c "php /var/www/html/artisan start:scheduler"
|
||||
php /var/www/html/artisan start:scheduler
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
FROM serversideup/php:8.2-fpm-nginx-v2.2.1 as base
|
||||
FROM serversideup/php:8.3-fpm-nginx as base
|
||||
USER root
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY composer.json composer.lock ./
|
||||
@@ -11,8 +12,10 @@ COPY --from=base --chown=9999:9999 /var/www/html .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM serversideup/php:8.2-fpm-nginx-v2.2.1
|
||||
|
||||
FROM serversideup/php:8.3-fpm-nginx
|
||||
USER root
|
||||
ARG USER_ID=9999
|
||||
ARG GROUP_ID=9999
|
||||
ARG TARGETPLATFORM
|
||||
# https://github.com/cloudflare/cloudflared/releases
|
||||
ARG CLOUDFLARED_VERSION=2024.4.1
|
||||
@@ -32,7 +35,7 @@ RUN apt-get update
|
||||
RUN apt-get install postgresql-client-$POSTGRES_VERSION -y
|
||||
|
||||
# Coolify requirements
|
||||
RUN apt-get install -y php8.2-pgsql openssh-client git git-lfs jq lsof vim
|
||||
RUN apt-get install -y openssh-client git git-lfs jq lsof vim
|
||||
RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
|
||||
COPY docker/prod/nginx.conf /etc/nginx/conf.d/custom.conf
|
||||
@@ -64,10 +67,15 @@ RUN /bin/bash -c "if [[ ${TARGETPLATFORM} == 'linux/arm64' ]]; then \
|
||||
curl -L https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-arm64 -o /usr/local/bin/cloudflared && chmod +x /usr/local/bin/cloudflared \
|
||||
;fi"
|
||||
|
||||
RUN { \
|
||||
echo 'upload_max_filesize=256M'; \
|
||||
echo 'post_max_size=256M'; \
|
||||
} > /etc/php/current_version/cli/conf.d/upload-limits.ini
|
||||
# RUN { \
|
||||
# echo 'upload_max_filesize=256M'; \
|
||||
# echo 'post_max_size=256M'; \
|
||||
# } > /etc/php/current_version/cli/conf.d/upload-limits.ini
|
||||
|
||||
COPY --from=minio/mc:RELEASE.2024-09-09T07-53-10Z /usr/bin/mc /usr/bin/mc
|
||||
RUN chmod +x /usr/bin/mc
|
||||
|
||||
RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID
|
||||
RUN docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID --service nginx
|
||||
USER www-data
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/command/execlineb -P
|
||||
foreground {
|
||||
s6-sleep 5
|
||||
su - webuser -c "php /var/www/html/artisan start:horizon"
|
||||
php /var/www/html/artisan start:horizon
|
||||
}
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#!/command/execlineb -P
|
||||
s6-setuidgid webuser
|
||||
php /var/www/html/artisan app:init --full-cleanup
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/command/execlineb -P
|
||||
foreground {
|
||||
s6-sleep 5
|
||||
su - webuser -c "php /var/www/html/artisan start:scheduler"
|
||||
php /var/www/html/artisan start:scheduler
|
||||
}
|
||||
|
||||
10
scripts/run
10
scripts/run
@@ -62,10 +62,10 @@ function sync:bunny {
|
||||
# }
|
||||
|
||||
function db:reset {
|
||||
bash spin exec -u webuser coolify php artisan migrate:fresh --seed
|
||||
bash spin exec coolify php artisan migrate:fresh --seed
|
||||
}
|
||||
function db:reset-prod {
|
||||
bash spin exec -u webuser coolify php artisan migrate:fresh --force --seed --seeder=ProductionSeeder ||
|
||||
bash spin exec coolify php artisan migrate:fresh --force --seed --seeder=ProductionSeeder ||
|
||||
php artisan migrate:fresh --force --seed --seeder=ProductionSeeder
|
||||
}
|
||||
|
||||
@@ -74,11 +74,11 @@ function mfs {
|
||||
}
|
||||
|
||||
function coolify {
|
||||
bash spin exec -u webuser coolify bash
|
||||
bash spin exec coolify bash
|
||||
}
|
||||
|
||||
function coolify:root {
|
||||
bash spin exec coolify bash
|
||||
bash spin exec -u root coolify bash
|
||||
}
|
||||
function coolify:proxy {
|
||||
docker exec -ti coolify-proxy sh
|
||||
@@ -93,7 +93,7 @@ function vite {
|
||||
}
|
||||
|
||||
function tinker {
|
||||
bash spin exec -u webuser coolify php artisan tinker
|
||||
bash spin exec coolify php artisan tinker
|
||||
}
|
||||
|
||||
# function build:helper {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"coolify": {
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.334"
|
||||
"version": "4.0.0-beta.336"
|
||||
},
|
||||
"nightly": {
|
||||
"version": "4.0.0-beta.335"
|
||||
"version": "4.0.0-beta.337"
|
||||
},
|
||||
"helper": {
|
||||
"version": "1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user