From 9a43059b60b73cd06ca5d9e2e3d34b5374d39fea Mon Sep 17 00:00:00 2001 From: Alexis Date: Wed, 13 May 2026 10:16:34 +0200 Subject: [PATCH] dix: mapear puertos en docker compose --- docker-compose.yml | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index da14276..8122bab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,9 +3,9 @@ services: backend: build: ./backend container_name: orcid-backend - restart: always + restart: unless-stopped ports: - - "8000:8000" + - "0.0.0.0:8072:8000" env_file: - ./backend/.env environment: @@ -17,28 +17,43 @@ services: condition: service_healthy redis: condition: service_started + read_only: true + tmpfs: + - /tmp + cap_drop: + - ALL + security_opt: + - no-new-privileges:true + healthcheck: + test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8000/health"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 15s frontend: build: ./frontend container_name: orcid-frontend - restart: always + restart: unless-stopped ports: - - "5173:5173" + - "0.0.0.0:8073:5173" depends_on: - backend env_file: - ./frontend/.env + security_opt: + - no-new-privileges:true db: image: postgres:16 container_name: orcid-postgres - restart: always + restart: unless-stopped environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: orcid_db - ports: - - "5432:5432" + expose: + - "5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: @@ -46,13 +61,18 @@ services: interval: 2s timeout: 3s retries: 20 + security_opt: + - no-new-privileges:true redis: image: redis:7 container_name: orcid-redis - restart: always - ports: - - "6379:6379" + restart: unless-stopped + command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"] + expose: + - "6379" + security_opt: + - no-new-privileges:true volumes: postgres_data: