From f3ac99a84497868aded8ee7ec2822d1b12960fd7 Mon Sep 17 00:00:00 2001 From: Mateus Cruz Date: Sun, 4 Feb 2024 23:10:30 -0300 Subject: initial commit --- docker-compose.yml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docker-compose.yml (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..28897d0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,55 @@ +version: '3.5' + +services: + api01: &api + image: rinhadebackend:latest + environment: + - DB_HOST=db + ports: + - 8081:8080 + depends_on: + - db + deploy: + resources: + limits: + cpus: "0.45" + memory: "200mb" + + api02: + <<: *api + environment: + - DB_HOST=db + ports: + - 8082:8080 + + nginx: + image: nginx:latest + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + depends_on: + - api01 + - api02 + ports: + - "9999:9999" + deploy: + resources: + limits: + cpus: "0.17" + memory: "10MB" + + db: + image: postgres:latest + hostname: db + environment: + - POSTGRES_PASSWORD=123 + - POSTGRES_USER=admin + - POSTGRES_DB=rinha + ports: + - "5432:5432" + volumes: + - ./script.sql:/docker-entrypoint-initdb.d/script.sql + deploy: + resources: + limits: + cpus: "0.13" + memory: "140MB" -- cgit v1.2.3