Skip to content

single ec2 deploy script fix - #217

Merged
WesleyEdwards merged 2 commits into
epoch-1from
we/single-ec2-deploy
Nov 16, 2026
Merged

WesleyEdwards merged 2 commits into
epoch-1from
we/single-ec2-deploy

Conversation

@WesleyEdwards

Copy link
Copy Markdown
Contributor

Duplicate nginx default_server

The catch-all server block (which drops unknown hosts and bare-IP requests) lived inside nginxServers(domain). That function is called once per domain, so a deployment with a separate WebSocket domain got the block twice. nginx allows only one default_server per address and port, so systemctl restart nginx failed and the init script aborted. The catch-all is now emitted once in nginxInstall(), before the per-domain blocks.

Atlas IP access list blocked the instance

terraformManagedVPC reported module.vpc.nat_public_ips as the VPC's NAT gateway IPs. Since service-abstractions 1.4, mongodbAtlas/mongodbAtlasFree allowlist exactly those IPs instead of 0.0.0.0/0. The single-EC2 instance runs in a public subnet with an Elastic IP, so its traffic goes out through the internet gateway as the EIP, not through the NAT. Atlas rejected every connection (SSLException: Received fatal alert: internal_error), the liveness check failed, and the first deploy rolled back. When IPv4 is enabled, natGatewayIps is now [aws_eip.main.public_ip].

@WesleyEdwards
WesleyEdwards changed the base branch from version-5.4 to epoch-1 November 16, 2026 18:40
# Conflicts:
#	deploy-aws-ec2/src/main/kotlin/com/lightningkite/lightningserver/terraform/aws/ec2/TerraformAwsSingleEc2Builder.kt
@WesleyEdwards
WesleyEdwards merged commit 84078ce into epoch-1 Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants