File tree 2 files changed +18
-5
lines changed
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Search for compose
2
2
3
3
## General informations
4
- This image is used in the local development environment. It provides a service that is used as standard in the Nginx proxy.
5
4
6
- If you call a url where no service is stored, this service is used.
5
+ This image is used in the local development environment. It provides a service that is used as standard in the Nginx
6
+ proxy.
7
+
8
+ If you call a URL where no service is stored, this service is used.
7
9
8
10
It searches through all available containers and finds the matching container that contains the domain.
9
11
The container can be started at the click of a button.
12
+
10
13
## How to use it
14
+
15
+ If your project was only stopped and not fully shut down, you can easily restart it by simply entering the project's URL
16
+ into your browser. This service will pop up, and with just one click on the start button, all containers
17
+ associated with the project will be launched. This eliminates the need to manually start the containers through the
18
+ console, saving you time and effort.
19
+
11
20
### Where you can find it too
12
- * github.com/andersudnsehr
21
+
22
+ * github.com/andersundsehr
13
23
* hub.docker.com
14
24
15
25
Made by me, Itay ≽^•⩊•^≼
Original file line number Diff line number Diff line change 3
3
$ certFiles = scandir ($ certsDir );
4
4
5
5
$ newConfig = '' ;
6
+ echo PHP_EOL . "\033[32m " . "Certificates : " . "\033[0m " . PHP_EOL ;
6
7
foreach ($ certFiles as $ cert ) {
7
8
if ($ cert == '. ' || $ cert == '.. ' ) continue ;
8
9
if (pathinfo ($ cert , PATHINFO_EXTENSION ) !== 'crt ' ) continue ;
9
10
if ($ cert === 'default.crt ' ) continue ;
10
11
$ domain = pathinfo ($ cert , PATHINFO_FILENAME );
12
+ echo PHP_EOL . "\033[32m " . "- " . $ domain . "\033[0m " . PHP_EOL ;
13
+ $ virtualHost = getenv ('VIRTUAL_HOST ' ) ?: throw new \Exception ('env VIRTUAL_HOST is required ' );
11
14
$ newConfig .= "
12
15
server {
13
16
server_name *. $ domain;
20
23
ssl_certificate /etc/nginx/certs/ $ domain.crt;
21
24
ssl_certificate_key /etc/nginx/certs/ $ domain.key;
22
25
location / {
23
- proxy_pass http://searchforcompose.vm17.iveins.de ;
26
+ proxy_pass http:// $ virtualHost ;
24
27
}
25
28
}
26
29
" ;
27
30
}
28
31
29
32
$ nginxConfFile = "/searchforcompose.conf " ;
30
- //nginx proxy nich restarten wenn nichts geändert wurde
33
+ //only restart nginx if the config file has changed
31
34
$ oldConfig = file_get_contents ($ nginxConfFile );
32
35
if ($ oldConfig === $ newConfig ) {
33
36
echo PHP_EOL . "\033[32m " . "Nginx config file did not change " . "\033[0m " . PHP_EOL ;
You can’t perform that action at this time.
0 commit comments