fix: launch Windows nginx from native project prefix
This commit is contained in:
@@ -8,6 +8,7 @@ import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
renderMariaDbConfig,
|
||||
nativeConfigPath,
|
||||
nativeServiceSpecs,
|
||||
renderNativeAdminerBootstrap,
|
||||
renderNginxConfig,
|
||||
renderPhpFpmConfig,
|
||||
@@ -63,6 +64,17 @@ describe('native project configuration', () => {
|
||||
expect(config).toContain('location ~ \\.php$')
|
||||
expect(config).toContain(nativeConfigPath(resolve(projectRoot, 'public')))
|
||||
})
|
||||
it('launches nginx with a project-relative config path', () => {
|
||||
const web = nativeServiceSpecs({ ...project, installedRuntimeRoot }).find((service) =>
|
||||
service.id.endsWith(':web')
|
||||
)
|
||||
expect(web?.args).toEqual([
|
||||
'-p',
|
||||
`${nativeConfigPath(join(projectRoot, '.aurora', 'native'))}/`,
|
||||
'-c',
|
||||
'config/nginx.conf'
|
||||
])
|
||||
})
|
||||
it('isolates MariaDB data and networking', () => {
|
||||
const config = renderMariaDbConfig(project, installedRuntimeRoot)
|
||||
expect(config).toContain('bind-address=127.0.0.1')
|
||||
|
||||
@@ -258,10 +258,10 @@ export function nativeServiceSpecs(project: NativeProjectDefinition): NativeServ
|
||||
...common('web'),
|
||||
command: runtimeExecutable(project, 'nginx'),
|
||||
args: [
|
||||
'-c',
|
||||
nativeConfigPath(join(directory, 'config', 'nginx.conf')),
|
||||
'-p',
|
||||
`${nativeConfigPath(directory)}/`
|
||||
`${nativeConfigPath(directory)}/`,
|
||||
'-c',
|
||||
'config/nginx.conf'
|
||||
],
|
||||
ready: { port: project.ports.http }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user