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
|
||||
USERID=
|
||||
GROUPID=
|
||||
PROJECT_PATH_ON_HOST=/Users/your-username-here/code/coollabsio/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 @@ public function __invoke(Server $server)
|
||||
);
|
||||
|
||||
$activity = remoteProcess([
|
||||
'mkdir -p proxy',
|
||||
'mkdir -p proxy/letsencrypt',
|
||||
'cd proxy',
|
||||
'mkdir -p projects',
|
||||
'mkdir -p projects/proxy',
|
||||
'mkdir -p projects/proxy/letsencrypt',
|
||||
'cd projects/proxy',
|
||||
"echo '$docker_compose_yml_base64' | base64 -d > docker-compose.yml",
|
||||
"echo '$env_file_base64' | base64 -d > .env",
|
||||
'cat .env',
|
||||
'docker compose up -d --remove-orphans',
|
||||
'docker ps',
|
||||
], $server, ActivityTypes::INLINE->value);
|
||||
|
||||
return $activity;
|
||||
@ -40,6 +42,12 @@ protected function getDockerComposeContents()
|
||||
*/
|
||||
protected function getComposeData(): array
|
||||
{
|
||||
$cwd = config('app.env') === 'local'
|
||||
? config('coolify.project_path_on_host') . '_testing_hosts/host_2_proxy'
|
||||
: '.';
|
||||
|
||||
ray($cwd);
|
||||
|
||||
return [
|
||||
"version" => "3.7",
|
||||
"networks" => [
|
||||
@ -64,8 +72,8 @@ protected function getComposeData(): array
|
||||
],
|
||||
"volumes" => [
|
||||
"/var/run/docker.sock:/var/run/docker.sock:ro",
|
||||
"./letsencrypt:/letsencrypt",
|
||||
"./traefik.auth:/auth/traefik.auth",
|
||||
"{$cwd}/letsencrypt:/letsencrypt",
|
||||
"{$cwd}/traefik.auth:/auth/traefik.auth",
|
||||
],
|
||||
"command" => [
|
||||
"--api.dashboard=true",
|
||||
|
@ -2,4 +2,6 @@
|
||||
|
||||
return [
|
||||
'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:
|
||||
dockerfile: Dockerfile
|
||||
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:
|
||||
- coolify
|
||||
|
||||
@ -52,9 +49,14 @@ services:
|
||||
testing-host:
|
||||
<<: *testing-host-base
|
||||
container_name: coolify-testing-host
|
||||
testing-host2:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
testing-host-2:
|
||||
<<: *testing-host-base
|
||||
container_name: coolify-testing-host-2
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- "./_testing_hosts/host_2_proxy:/root/projects/proxy"
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user