File tree Expand file tree Collapse file tree 7 files changed +37
-4
lines changed Expand file tree Collapse file tree 7 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -628,6 +628,7 @@ func (d *Devbox) StartProcessManager(ctx context.Context) error {
628
628
}
629
629
processComposePath , err := utilityLookPath ("process-compose" )
630
630
if err != nil {
631
+ fmt .Fprintln (d .writer , "Installing process-compose. This may take a minute but will only happen once." )
631
632
if err = addDevboxUtilityPackage ("process-compose" ); err != nil {
632
633
return err
633
634
}
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ import (
6
6
7
7
"github.com/pkg/errors"
8
8
"go.jetpack.io/devbox/internal/nix"
9
- "go.jetpack.io/devbox/internal/planner/plansdk"
10
9
"go.jetpack.io/devbox/internal/xdg"
11
10
)
12
11
12
+ // we need a more modern commit to get version of process-compose we want
13
+ // once the default nixpkgs commit is updated, we can remove this
14
+ const nixpkgsUtilityCommit = "f7475ce8950b761d80a13f3f81d2c23fce60c1dd"
15
+
13
16
// addDevboxUtilityPackage adds a package to the devbox utility profile.
14
17
// It's used to install applications devbox might need, like process-compose
15
18
// This is an alternative to a global install which would modify a user's
@@ -19,7 +22,7 @@ func addDevboxUtilityPackage(pkg string) error {
19
22
if err != nil {
20
23
return err
21
24
}
22
- return nix .ProfileInstall (profilePath , plansdk . DefaultNixpkgsCommit , pkg )
25
+ return nix .ProfileInstall (profilePath , nixpkgsUtilityCommit , pkg )
23
26
}
24
27
25
28
func utilityLookPath (binName string ) (string , error ) {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ LoadModule proxy_module modules/mod_proxy.so
15
15
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
16
16
LoadModule dir_module modules/mod_dir.so
17
17
LoadModule alias_module modules/mod_alias.so
18
+ LoadModule log_config_module modules/mod_log_config.so
18
19
19
20
<IfModule unixd_module >
20
21
User daemon
@@ -37,6 +38,8 @@ DocumentRoot "${HTTPD_CONFDIR}/../web"
37
38
Require all denied
38
39
</Files >
39
40
ErrorLog "${HTTPD_ERROR_LOG_FILE}"
41
+ LogFormat "%h %l %u %t \"%r\" %>s %b" access
42
+ CustomLog "${HTTPD_ACCESS_LOG_FILE}" access
40
43
<IfModule headers_module >
41
44
RequestHeader unset Proxy early
42
45
</IfModule >
Original file line number Diff line number Diff line change
1
+ version : " 0.5"
2
+
3
+ processes :
4
+ apache :
5
+ command : " echo \" Apache starting on port $HTTPD_PORT\ http://localhost:$HTTPD_PORT\" && apachectl start -f $HTTPD_CONFDIR/httpd.conf -D FOREGROUND"
6
+ availability :
7
+ restart : " always"
8
+ apache-error :
9
+ command : " tail -f $HTTPD_ERROR_LOG_FILE"
10
+ availability :
11
+ restart : " always"
12
+ apache-access :
13
+ command : " tail -f $HTTPD_ACCESS_LOG_FILE"
14
+ availability :
15
+ restart : " always"
Original file line number Diff line number Diff line change 6
6
"HTTPD_DEVBOX_CONFIG_DIR" : " {{ .DevboxProjectDir }}" ,
7
7
"HTTPD_CONFDIR" : " {{ .DevboxDir }}" ,
8
8
"HTTPD_ERROR_LOG_FILE" : " {{ .Virtenv }}/error.log" ,
9
+ "HTTPD_ACCESS_LOG_FILE" : " {{ .Virtenv }}/access.log" ,
9
10
"HTTPD_PORT" : " 8080"
10
11
},
11
12
"create_files" : {
12
13
"{{ .DevboxDir }}/httpd.conf" : " apache/httpd.conf" ,
13
- "{{ .DevboxDirRoot }}/web/index.html" : " web/index.html"
14
+ "{{ .DevboxDirRoot }}/web/index.html" : " web/index.html" ,
15
+ "{{ .Virtenv }}/process-compose.yaml" : " apache/process-compose.yaml"
14
16
},
15
17
"services" : {
16
18
"apache" : {
Original file line number Diff line number Diff line change 9
9
"PHPFPM_PORT" : " 8082"
10
10
},
11
11
"create_files" : {
12
- "{{ .DevboxDir }}/php-fpm.conf" : " php/php-fpm.conf"
12
+ "{{ .DevboxDir }}/php-fpm.conf" : " php/php-fpm.conf" ,
13
+ "{{ .Virtenv }}/process-compose.yaml" : " php/process-compose.yaml"
13
14
},
14
15
"services" : {
15
16
"php-fpm" : {
Original file line number Diff line number Diff line change
1
+ version : " 0.5"
2
+
3
+ processes :
4
+ php-fpm :
5
+ command : " php-fpm -y {{ .DevboxDir }}/php-fpm.conf --nodaemonize"
6
+ availability :
7
+ restart : " always"
8
+
You can’t perform that action at this time.
0 commit comments