update nginx image version

This commit is contained in:
Marcos Uchoa 2025-08-10 10:23:36 -03:00
parent b32d69b9d0
commit 989e968d24
3 changed files with 12 additions and 6 deletions

View file

@ -1,7 +1,7 @@
services: services:
nginx: nginx:
container_name: balance-zig-pay container_name: balance-zig-pay
image: nginx:1.25-alpine image: nginx:1.28-alpine
volumes: volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on: depends_on:
@ -14,7 +14,7 @@ services:
deploy: deploy:
resources: resources:
limits: limits:
cpus: "0.50" cpus: "0.70"
memory: "10MB" memory: "10MB"
zig1: &zig zig1: &zig
container_name: zig-pay-1 container_name: zig-pay-1
@ -35,7 +35,7 @@ services:
deploy: deploy:
resources: resources:
limits: limits:
cpus: "0.50" cpus: "0.15"
memory: "10MB" memory: "10MB"
zig2: zig2:
<<: *zig <<: *zig

View file

@ -3,17 +3,23 @@ worker_rlimit_nofile 100000;
events { events {
use epoll; use epoll;
worker_connections 550; worker_connections 1024;
} }
http { http {
access_log off; access_log off;
error_log /dev/null emerg; error_log /dev/null crit;
tcp_nopush on;
tcp_nodelay on;
upstream backend_servers { upstream backend_servers {
server zig1:8080; server zig1:8080;
server zig2:8080; server zig2:8080;
keepalive 500; keepalive 500;
} }
server { server {
listen 9999; listen 9999;
location / { location / {

View file

@ -192,7 +192,7 @@ pub const HttpService = struct {
pub fn startMessenger(self: *HttpService, connections: []ServiceConnection, tickets: []ServiceTicket, thread_id: usize) void { pub fn startMessenger(self: *HttpService, connections: []ServiceConnection, tickets: []ServiceTicket, thread_id: usize) void {
while (true) { while (true) {
Thread.sleep(5_000_000); Thread.sleep(10_000_000);
if (self.thread_stop[thread_id]) { if (self.thread_stop[thread_id]) {
var conn_open = false; var conn_open = false;