Proxy Traefik v2 gets running.
This commit is contained in:
parent
cc51b1d394
commit
aeacd7cf34
@ -5,6 +5,7 @@
|
|||||||
# Run in your terminal: `id -u` and `id -g` and that's the results
|
# Run in your terminal: `id -u` and `id -g` and that's the results
|
||||||
USERID=
|
USERID=
|
||||||
GROUPID=
|
GROUPID=
|
||||||
|
PROJECT_PATH_ON_HOST=/Users/your-username-here/code/coollabsio/coolify
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
|
|
||||||
APP_NAME=Coolify
|
APP_NAME=Coolify
|
||||||
|
2
_testing_hosts/host_2_proxy/.gitignore
vendored
Normal file
2
_testing_hosts/host_2_proxy/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
@ -19,12 +19,14 @@ class InstallProxy
|
|||||||
);
|
);
|
||||||
|
|
||||||
$activity = remoteProcess([
|
$activity = remoteProcess([
|
||||||
'mkdir -p proxy',
|
'mkdir -p projects',
|
||||||
'mkdir -p proxy/letsencrypt',
|
'mkdir -p projects/proxy',
|
||||||
'cd proxy',
|
'mkdir -p projects/proxy/letsencrypt',
|
||||||
|
'cd projects/proxy',
|
||||||
"echo '$docker_compose_yml_base64' | base64 -d > docker-compose.yml",
|
"echo '$docker_compose_yml_base64' | base64 -d > docker-compose.yml",
|
||||||
"echo '$env_file_base64' | base64 -d > .env",
|
"echo '$env_file_base64' | base64 -d > .env",
|
||||||
'cat .env',
|
'docker compose up -d --remove-orphans',
|
||||||
|
'docker ps',
|
||||||
], $server, ActivityTypes::INLINE->value);
|
], $server, ActivityTypes::INLINE->value);
|
||||||
|
|
||||||
return $activity;
|
return $activity;
|
||||||
@ -40,6 +42,12 @@ class InstallProxy
|
|||||||
*/
|
*/
|
||||||
protected function getComposeData(): array
|
protected function getComposeData(): array
|
||||||
{
|
{
|
||||||
|
$cwd = config('app.env') === 'local'
|
||||||
|
? config('coolify.project_path_on_host') . '_testing_hosts/host_2_proxy'
|
||||||
|
: '.';
|
||||||
|
|
||||||
|
ray($cwd);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
"version" => "3.7",
|
"version" => "3.7",
|
||||||
"networks" => [
|
"networks" => [
|
||||||
@ -64,8 +72,8 @@ class InstallProxy
|
|||||||
],
|
],
|
||||||
"volumes" => [
|
"volumes" => [
|
||||||
"/var/run/docker.sock:/var/run/docker.sock:ro",
|
"/var/run/docker.sock:/var/run/docker.sock:ro",
|
||||||
"./letsencrypt:/letsencrypt",
|
"{$cwd}/letsencrypt:/letsencrypt",
|
||||||
"./traefik.auth:/auth/traefik.auth",
|
"{$cwd}/traefik.auth:/auth/traefik.auth",
|
||||||
],
|
],
|
||||||
"command" => [
|
"command" => [
|
||||||
"--api.dashboard=true",
|
"--api.dashboard=true",
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'version' => '4.0.0-nightly.1',
|
'version' => '4.0.0-nightly.1',
|
||||||
|
|
||||||
|
'project_path_on_host' => env('PROJECT_PATH_ON_HOST', '/var/www/html')
|
||||||
];
|
];
|
||||||
|
@ -5,9 +5,6 @@ x-testing-host: &testing-host-base
|
|||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: ./docker/testing-host
|
context: ./docker/testing-host
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- ./docker/testing-host/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
|
||||||
networks:
|
networks:
|
||||||
- coolify
|
- coolify
|
||||||
|
|
||||||
@ -52,9 +49,14 @@ services:
|
|||||||
testing-host:
|
testing-host:
|
||||||
<<: *testing-host-base
|
<<: *testing-host-base
|
||||||
container_name: coolify-testing-host
|
container_name: coolify-testing-host
|
||||||
testing-host2:
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
testing-host-2:
|
||||||
<<: *testing-host-base
|
<<: *testing-host-base
|
||||||
container_name: coolify-testing-host-2
|
container_name: coolify-testing-host-2
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- "./_testing_hosts/host_2_proxy:/root/projects/proxy"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user