version: "3.9" services: mongo: image: mongo:7 container_name: mongo restart: unless-stopped ports: - "27017:27017" volumes: - mongo_data:/data/db api: build: ./server container_name: api restart: unless-stopped environment: - MONGO_URI=mongodb://mongo:27017/mydb - JWT_SECRET=supersegreto-cambialo - PORT=3000 ports: - "3000:3000" volumes: - ./server/uploads:/app/uploads depends_on: - mongo frontend: image: nginx:alpine container_name: frontend restart: unless-stopped ports: - "8080:80" volumes: - ./frontend:/usr/share/nginx/html:ro depends_on: - api volumes: mongo_data: