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 {
628628 }
629629 processComposePath , err := utilityLookPath ("process-compose" )
630630 if err != nil {
631+ fmt .Fprintln (d .writer , "Installing process-compose. This may take a minute but will only happen once." )
631632 if err = addDevboxUtilityPackage ("process-compose" ); err != nil {
632633 return err
633634 }
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ import (
66
77 "github.com/pkg/errors"
88 "go.jetpack.io/devbox/internal/nix"
9- "go.jetpack.io/devbox/internal/planner/plansdk"
109 "go.jetpack.io/devbox/internal/xdg"
1110)
1211
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+
1316// addDevboxUtilityPackage adds a package to the devbox utility profile.
1417// It's used to install applications devbox might need, like process-compose
1518// This is an alternative to a global install which would modify a user's
@@ -19,7 +22,7 @@ func addDevboxUtilityPackage(pkg string) error {
1922 if err != nil {
2023 return err
2124 }
22- return nix .ProfileInstall (profilePath , plansdk . DefaultNixpkgsCommit , pkg )
25+ return nix .ProfileInstall (profilePath , nixpkgsUtilityCommit , pkg )
2326}
2427
2528func 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
1515LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
1616LoadModule dir_module modules/mod_dir.so
1717LoadModule alias_module modules/mod_alias.so
18+ LoadModule log_config_module modules/mod_log_config.so
1819
1920<IfModule unixd_module >
2021 User daemon
@@ -37,6 +38,8 @@ DocumentRoot "${HTTPD_CONFDIR}/../web"
3738 Require all denied
3839</Files >
3940ErrorLog "${HTTPD_ERROR_LOG_FILE}"
41+ LogFormat "%h %l %u %t \"%r\" %>s %b" access
42+ CustomLog "${HTTPD_ACCESS_LOG_FILE}" access
4043<IfModule headers_module >
4144 RequestHeader unset Proxy early
4245</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 66 "HTTPD_DEVBOX_CONFIG_DIR" : " {{ .DevboxProjectDir }}" ,
77 "HTTPD_CONFDIR" : " {{ .DevboxDir }}" ,
88 "HTTPD_ERROR_LOG_FILE" : " {{ .Virtenv }}/error.log" ,
9+ "HTTPD_ACCESS_LOG_FILE" : " {{ .Virtenv }}/access.log" ,
910 "HTTPD_PORT" : " 8080"
1011 },
1112 "create_files" : {
1213 "{{ .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"
1416 },
1517 "services" : {
1618 "apache" : {
Original file line number Diff line number Diff line change 99 "PHPFPM_PORT" : " 8082"
1010 },
1111 "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"
1314 },
1415 "services" : {
1516 "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