From 732b2a42a48a5ce2ab32a5a1ecd6d68a89f4e639 Mon Sep 17 00:00:00 2001 From: Felipe Fernandes Versiane <felipeversiane09@gmail.com> Date: Thu, 13 Jun 2024 20:21:50 -0300 Subject: [PATCH] fix: refactor docker-compose files --- docker-compose.ci.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index b3f8cd4..3a98535 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -3,8 +3,11 @@ version: '3.0' services: db: container_name: pg01 - image: postgres:11-alpine + build: + context: . + dockerfile: build/db/Dockerfile environment: + POSTGRES_HOST: ${POSTGRES_HOST} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB} @@ -46,11 +49,12 @@ services: container_name: go01 restart: unless-stopped environment: - LOG_LEVEL: ${LOG_LEVEL} - GIN_MODE: ${GIN_MODE} - LOG_OUTPUT: ${LOG_OUTPUT} - AUTHORIZATION_URL: ${AUTHORIZATION_URL} - POSTGRES_URL: ${POSTGRES_URL} + - PORT=${PORT} + - GIN_MODE=${GIN_MODE} + - LOG_LEVEL=${LOG_LEVEL} + - LOG_OUTPUT=${LOG_OUTPUT} + - AUTHORIZATION_URL=${AUTHORIZATION_URL} + - POSTGRES_URL=${POSTGRES_URL} ports: - "${PORT}:${PORT}" depends_on: @@ -61,8 +65,8 @@ services: deploy: resources: limits: - cpus: '0.1' - memory: '0.1GB' + cpus: '0.2' + memory: '0.2GB' volumes: local_postgres_data: {}