feat: add coolify deployment and meta tracking
This commit is contained in:
20
tests/deploy.test.ts
Normal file
20
tests/deploy.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
describe('Coolify and Nixpacks deployment config', () => {
|
||||
it('defines a production start script that binds to all interfaces and PORT', () => {
|
||||
const packageJson = JSON.parse(readFileSync('package.json', 'utf8'));
|
||||
|
||||
expect(packageJson.scripts.start).toContain('astro preview');
|
||||
expect(packageJson.scripts.start).toContain('--host 0.0.0.0');
|
||||
expect(packageJson.scripts.start).toContain('${PORT:-4321}');
|
||||
});
|
||||
|
||||
it('pins Nixpacks install, build, and start commands for Coolify', () => {
|
||||
const nixpacks = readFileSync('nixpacks.toml', 'utf8');
|
||||
|
||||
expect(nixpacks).toContain('npm ci');
|
||||
expect(nixpacks).toContain('npm run build');
|
||||
expect(nixpacks).toContain('npm run start');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user