Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/docker-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,11 @@ describe('docker-manager', () => {
const result = generateDockerCompose(configWithProxy, mockNetworkConfigWithProxy);
const proxy = result.services['api-proxy'];
expect(proxy.healthcheck).toBeDefined();
expect((proxy.healthcheck as any).test).toEqual(['CMD', 'curl', '-f', 'http://localhost:10000/health']);
const healthcheck = proxy.healthcheck!;
expect(healthcheck.test).toEqual(['CMD', 'curl', '-f', 'http://localhost:10000/health']);
expect(healthcheck.timeout).toBe('2s');
expect(healthcheck.retries).toBe(10);
expect(healthcheck.start_period).toBe('10s');
});

it('should drop all capabilities', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/docker-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1773,9 +1773,9 @@ export function generateDockerCompose(
healthcheck: {
test: ['CMD', 'curl', '-f', `http://localhost:${API_PROXY_HEALTH_PORT}/health`],
interval: '1s',
timeout: '1s',
retries: 5,
start_period: '2s',
timeout: '2s',
retries: 10,
start_period: '10s',
},
// Security hardening: Drop all capabilities
cap_drop: ['ALL'],
Expand Down
Loading